Interface IRecordView<T>
Record view interface provides methods to access table records.
public interface IRecordView<T> : IDataStreamerTarget<T>, IContinuousQuerySource<T> where T : notnull
Type Parameters
TRecord type.
- Inherited Members
Methods
AsQueryable(ITransaction?, QueryableOptions?)
Gets a IQueryable<T> to perform Ignite SQL queries using LINQ (see https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/).
Use ToResultSetAsync<T>(IQueryable<T>) to materialize query results asynchronously.IQueryable<T> AsQueryable(ITransaction? transaction = null, QueryableOptions? options = null)
Parameters
transactionITransactionOptional transaction.
optionsQueryableOptionsOptions.
Returns
ContainsKeyAsync(ITransaction?, T)
Determines if the table contains an entry for the specified key.
Task<bool> ContainsKeyAsync(ITransaction? transaction, T key)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTA record with key columns set.
Returns
- Task<bool>
A Task representing the asynchronous operation. The task result is
trueif a value exists for the specified key, andfalseotherwise.
DeleteAllAsync(ITransaction?, IEnumerable<T>)
Deletes multiple records. If one or more keys do not exist, other records are still deleted.
Task<IList<T>> DeleteAllAsync(ITransaction? transaction, IEnumerable<T> keys)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keysIEnumerable<T>Record keys to delete.
Returns
- Task<IList<T>>
A Task representing the asynchronous operation. The task result contains records from
keysthat did not exist.
DeleteAllExactAsync(ITransaction?, IEnumerable<T>)
Deletes multiple exactly matching records. If one or more records do not exist, other records are still deleted.
Task<IList<T>> DeleteAllExactAsync(ITransaction? transaction, IEnumerable<T> records)
Parameters
transactionITransactionThe transaction or
nullto auto commit.recordsIEnumerable<T>Records to delete.
Returns
- Task<IList<T>>
A Task representing the asynchronous operation. The task result contains records from
recordsthat did not exist.
DeleteAsync(ITransaction?, T)
Deletes a record with the specified key.
Task<bool> DeleteAsync(ITransaction? transaction, T key)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTA record with key columns set.
Returns
- Task<bool>
A Task representing the asynchronous operation. The task result contains a value indicating whether a record with the specified key was deleted.
DeleteExactAsync(ITransaction?, T)
Deletes a record only if all existing columns have the same values as the specified record.
Task<bool> DeleteExactAsync(ITransaction? transaction, T record)
Parameters
transactionITransactionThe transaction or
nullto auto commit.recordTA record with all columns set.
Returns
- Task<bool>
A Task representing the asynchronous operation. The task result contains a value indicating whether a record was deleted.
GetAllAsync(ITransaction?, IEnumerable<T>)
Gets multiple records by keys.
Task<IList<Option<T>>> GetAllAsync(ITransaction? transaction, IEnumerable<T> keys)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keysIEnumerable<T>Collection of records with key columns set.
Returns
- Task<IList<Option<T>>>
A Task representing the asynchronous operation. The task result contains matching records with all columns filled from the table. The order of collection elements is guaranteed to be the same as the order of
keys. If a record does not exist, the element at the corresponding index of the resulting collection will be empty Option<T>.
GetAndDeleteAsync(ITransaction?, T)
Gets and deletes a record with the specified key.
Task<Option<T>> GetAndDeleteAsync(ITransaction? transaction, T key)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTA record with key columns set.
Returns
- Task<Option<T>>
A Task representing the asynchronous operation. The task result contains deleted record or empty Option<T> if it did not exist.
GetAndReplaceAsync(ITransaction?, T)
Replaces a record with the same key columns if it exists.
Task<Option<T>> GetAndReplaceAsync(ITransaction? transaction, T record)
Parameters
transactionITransactionThe transaction or
nullto auto commit.recordTRecord to insert.
Returns
- Task<Option<T>>
A Task representing the asynchronous operation. The task result contains the previous value for the given key, or empty Option<T> if it did not exist.
GetAndUpsertAsync(ITransaction?, T)
Inserts a record into the table and returns previous record.
Task<Option<T>> GetAndUpsertAsync(ITransaction? transaction, T record)
Parameters
transactionITransactionThe transaction or
nullto auto commit.recordTRecord to upsert.
Returns
- Task<Option<T>>
A Task representing the asynchronous operation. The task result contains replaced record or null if it did not exist.
GetAsync(ITransaction?, T)
Gets a record by key.
Task<Option<T>> GetAsync(ITransaction? transaction, T key)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTA record with key columns set.
Returns
- Task<Option<T>>
A Task representing the asynchronous operation. The task result contains a record with all columns.
InsertAllAsync(ITransaction?, IEnumerable<T>)
Inserts multiple records into the table, skipping existing ones.
Task<IList<T>> InsertAllAsync(ITransaction? transaction, IEnumerable<T> records)
Parameters
transactionITransactionThe transaction or
nullto auto commit.recordsIEnumerable<T>Records to insert.
Returns
- Task<IList<T>>
A Task representing the asynchronous operation. The task result contains skipped records.
InsertAsync(ITransaction?, T)
Inserts a record into the table if it does not exist.
Task<bool> InsertAsync(ITransaction? transaction, T record)
Parameters
transactionITransactionThe transaction or
nullto auto commit.recordTRecord to insert.
Returns
- Task<bool>
A Task representing the asynchronous operation. The task result contains a value indicating whether the record was inserted. Returns
falseif a record with the same key already exists.
ReplaceAsync(ITransaction?, T)
Replaces a record with the same key columns if it exists, otherwise does nothing.
Task<bool> ReplaceAsync(ITransaction? transaction, T record)
Parameters
transactionITransactionThe transaction or
nullto auto commit.recordTRecord to insert.
Returns
- Task<bool>
A Task representing the asynchronous operation. The task result contains a value indicating whether a record with the specified key was replaced.
ReplaceAsync(ITransaction?, T, T)
Replaces a record with a new one only if all existing columns have the same values
as the specified record.
Task<bool> ReplaceAsync(ITransaction? transaction, T record, T newRecord)
Parameters
transactionITransactionThe transaction or
nullto auto commit.recordTRecord to replace.
newRecordTRecord to replace with.
Returns
- Task<bool>
A Task representing the asynchronous operation. The task result contains a value indicating whether a record was replaced.
UpsertAllAsync(ITransaction?, IEnumerable<T>)
Inserts multiple records into the table, replacing existing ones.
Task UpsertAllAsync(ITransaction? transaction, IEnumerable<T> records)
Parameters
transactionITransactionThe transaction or
nullto auto commit.recordsIEnumerable<T>Records to upsert.
Returns
UpsertAsync(ITransaction?, T)
Inserts a record into the table if it does not exist or replaces the existing one.
Task UpsertAsync(ITransaction? transaction, T record)
Parameters
transactionITransactionThe transaction or
nullto auto commit.recordTRecord to upsert.