Table of Contents

Interface IKeyValueView<TK, TV>

Namespace
Apache.Ignite.Table
Assembly
Apache.Ignite.dll

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

TK

Key type.

TV

Value 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<KeyValuePair<TK, TV>> AsQueryable(ITransaction? transaction = null, QueryableOptions? options = null)

Parameters

transaction ITransaction

Optional transaction.

options QueryableOptions

Options.

Returns

IQueryable<KeyValuePair<TK, TV>>

IQueryable<T>.

ContainsAsync(ITransaction?, TK)

Determines if the table contains an entry for the specified key.

Task<bool> ContainsAsync(ITransaction? transaction, TK key)

Parameters

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

Returns

Task<bool>

A Task representing the asynchronous operation. The task result is true if a value exists for the specified key, and false otherwise.

GetAllAsync(ITransaction?, IEnumerable<TK>)

Gets multiple records by keys.

Task<IDictionary<TK, TV>> GetAllAsync(ITransaction? transaction, IEnumerable<TK> keys)

Parameters

transaction ITransaction

The transaction or null to auto commit.

keys IEnumerable<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

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

val TV

Value.

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

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

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

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

val TV

Value.

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

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

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

transaction ITransaction

The transaction or null to auto commit.

pairs IEnumerable<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

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

val TV

Value.

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

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

val TV

Value.

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

transaction ITransaction

The transaction or null to auto commit.

pairs IEnumerable<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

transaction ITransaction

The transaction or null to auto commit.

keys IEnumerable<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

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

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

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

val TV

Val.

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

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

val TV

Value.

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

transaction ITransaction

The transaction or null to auto commit.

key TK

Key.

oldVal TV

Old value.

newVal TV

New value.

Returns

Task<bool>

A Task representing the asynchronous operation. The task result contains a value indicating whether a record was replaced.