Interface IKeyValueView<TK, TV>
Key-value view provides access to table records in form of separate key and value parts.
public interface IKeyValueView<TK, TV> : IDataStreamerTarget<KeyValuePair<TK, TV>>, IContinuousQuerySource<KeyValuePair<TK, TV>> where TK : notnull
Type Parameters
TKKey type.
TVValue 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.[RequiresUnreferencedCode("LINQ provider does not support trimming and AOT scenarios. Use SQL queries instead.")]
IQueryable<KeyValuePair<TK, TV>> AsQueryable(ITransaction? transaction = null, QueryableOptions? options = null)
Parameters
transactionITransactionOptional transaction.
optionsQueryableOptionsOptions.
Returns
- IQueryable<KeyValuePair<TK, TV>>
ContainsAllKeysAsync(ITransaction?, IEnumerable<TK>)
Determines if the table contains entries for all specified keys.
Task<bool> ContainsAllKeysAsync(ITransaction? transaction, IEnumerable<TK> keys)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keysIEnumerable<TK>Keys.
Returns
- Task<bool>
A Task representing the asynchronous operation. The task result is
trueif values exist for all specified keys, andfalseotherwise.
ContainsAsync(ITransaction?, TK)
Determines if the table contains an entry for the specified key.
Task<bool> ContainsAsync(ITransaction? transaction, TK key)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
Returns
- Task<bool>
A Task representing the asynchronous operation. The task result is
trueif a value exists for the specified key, andfalseotherwise.
GetAllAsync(ITransaction?, IEnumerable<TK>)
Gets multiple records by keys.
Task<IDictionary<TK, TV>> GetAllAsync(ITransaction? transaction, IEnumerable<TK> keys)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keysIEnumerable<TK>Keys.
Returns
- Task<IDictionary<TK, TV>>
A Task representing the asynchronous operation. The task result contains a dictionary with specified keys and their values. If a record for a particular key does not exist, it will not be present in the resulting dictionary.
GetAndPutAsync(ITransaction?, TK, TV)
Puts a value with a given key and returns previous value for that key.
Task<Option<TV>> GetAndPutAsync(ITransaction? transaction, TK key, TV val)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
valTVValue.
Returns
- Task<Option<TV>>
A Task<TResult> representing the asynchronous operation. The task result contains the value for the specified key, or an Option<T> instance without a value when specified key is not present in the table.
GetAndRemoveAsync(ITransaction?, TK)
Gets and removes a value associated with the given key.
Task<Option<TV>> GetAndRemoveAsync(ITransaction? transaction, TK key)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
Returns
- Task<Option<TV>>
A Task<TResult> representing the asynchronous operation. The task result contains a value indicating whether the key was removed from the table.
GetAndReplaceAsync(ITransaction?, TK, TV)
Replaces a record with the same key columns if it exists.
Task<Option<TV>> GetAndReplaceAsync(ITransaction? transaction, TK key, TV val)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
valTVValue.
Returns
- Task<Option<TV>>
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.
GetAsync(ITransaction?, TK)
Gets a value associated with the given key.
Task<Option<TV>> GetAsync(ITransaction? transaction, TK key)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
Returns
- Task<Option<TV>>
A Task<TResult> representing the asynchronous operation. The task result contains the value for the specified key, or an Option<T> instance without a value when specified key is not present in the table.
PutAllAsync(ITransaction?, IEnumerable<KeyValuePair<TK, TV>>)
Puts multiple key-value pairs.
Task PutAllAsync(ITransaction? transaction, IEnumerable<KeyValuePair<TK, TV>> pairs)
Parameters
transactionITransactionThe transaction or
nullto auto commit.pairsIEnumerable<KeyValuePair<TK, TV>>Pairs.
Returns
- Task
A Task<TResult> representing the asynchronous operation.
PutAsync(ITransaction?, TK, TV)
Puts a value with a given key.
Task PutAsync(ITransaction? transaction, TK key, TV val)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
valTVValue.
Returns
- Task
A Task<TResult> representing the asynchronous operation.
PutIfAbsentAsync(ITransaction?, TK, TV)
Puts a value with a given key if the specified key is not present in the table.
Task<bool> PutIfAbsentAsync(ITransaction? transaction, TK key, TV val)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
valTVValue.
Returns
- Task<bool>
A Task<TResult> representing the asynchronous operation. The task result contains a value indicating whether the value was added to the table.
RemoveAllAsync(ITransaction?, IEnumerable<KeyValuePair<TK, TV>>)
Removes records with given keys and values from the table.
Task<IList<TK>> RemoveAllAsync(ITransaction? transaction, IEnumerable<KeyValuePair<TK, TV>> pairs)
Parameters
transactionITransactionThe transaction or
nullto auto commit.pairsIEnumerable<KeyValuePair<TK, TV>>Keys.
Returns
- Task<IList<TK>>
A Task<TResult> representing the asynchronous operation. The task result contains skipped keys.
RemoveAllAsync(ITransaction?, IEnumerable<TK>)
Removes values with given keys from the table.
Task<IList<TK>> RemoveAllAsync(ITransaction? transaction, IEnumerable<TK> keys)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keysIEnumerable<TK>Keys.
Returns
- Task<IList<TK>>
A Task<TResult> representing the asynchronous operation. The task result contains skipped keys.
RemoveAsync(ITransaction?, TK)
Removes a value with a given key from the table.
Task<bool> RemoveAsync(ITransaction? transaction, TK key)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
Returns
- Task<bool>
A Task<TResult> representing the asynchronous operation. The task result contains a value indicating whether the key was removed from the table.
RemoveAsync(ITransaction?, TK, TV)
Removes a value with a given key from the table only if it is equal to the specified value.
Task<bool> RemoveAsync(ITransaction? transaction, TK key, TV val)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
valTVVal.
Returns
- Task<bool>
A Task<TResult> representing the asynchronous operation. The task result contains a value indicating whether the key was removed from the table.
ReplaceAsync(ITransaction?, TK, TV)
Replaces a record with the same key columns if it exists, otherwise does nothing.
Task<bool> ReplaceAsync(ITransaction? transaction, TK key, TV val)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
valTVValue.
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?, TK, TV, TV)
Replaces a record with a new one only if all existing columns have the same values
as the specified oldVal.
Task<bool> ReplaceAsync(ITransaction? transaction, TK key, TV oldVal, TV newVal)
Parameters
transactionITransactionThe transaction or
nullto auto commit.keyTKKey.
oldValTVOld value.
newValTVNew value.