![]() |
Apache Ignite C++ Client
|
#include <key_value_view.h>
Public Types | |
| typedef std::decay< K >::type | key_type |
| typedef std::decay< V >::type | value_type |
Public Member Functions | |
| key_value_view (const key_value_view &)=delete | |
| key_value_view & | operator= (const key_value_view &)=delete |
| key_value_view (key_value_view &&) noexcept=default | |
| key_value_view & | operator= (key_value_view &&) noexcept=default |
| void | get_async (transaction *tx, const key_type &key, ignite_callback< std::optional< value_type > > callback) |
| std::optional< value_type > | get (transaction *tx, const key_type &key) |
| void | get_all_async (transaction *tx, std::vector< key_type > keys, ignite_callback< std::vector< std::optional< value_type > > > callback) |
| std::vector< std::optional< value_type > > | get_all (transaction *tx, std::vector< key_type > keys) |
| void | contains_async (transaction *tx, const key_type &key, ignite_callback< bool > callback) |
| bool | contains (transaction *tx, const key_type &key) |
| void | put_async (transaction *tx, const key_type &key, const value_type &value, ignite_callback< void > callback) |
| void | put (transaction *tx, const key_type &key, const value_type &value) |
| void | put_all_async (transaction *tx, const std::vector< std::pair< key_type, value_type > > &pairs, ignite_callback< void > callback) |
| void | put_all (transaction *tx, const std::vector< std::pair< key_type, value_type > > &pairs) |
| void | get_and_put_async (transaction *tx, const key_type &key, const value_type &value, ignite_callback< std::optional< value_type > > callback) |
| std::optional< value_type > | get_and_put (transaction *tx, const key_type &key, const value_type &value) |
| void | put_if_absent_async (transaction *tx, const key_type &key, const value_type &value, ignite_callback< bool > callback) |
| bool | put_if_absent (transaction *tx, const key_type &key, const value_type &value) |
| void | remove_async (transaction *tx, const key_type &key, ignite_callback< bool > callback) |
| bool | remove (transaction *tx, const key_type &key) |
| void | remove_async (transaction *tx, const key_type &key, const value_type &value, ignite_callback< bool > callback) |
| bool | remove (transaction *tx, const key_type &key, const value_type &value) |
| void | remove_all_async (transaction *tx, std::vector< key_type > keys, ignite_callback< std::vector< key_type > > callback) |
| std::vector< key_type > | remove_all (transaction *tx, std::vector< key_type > keys) |
| void | remove_all_async (transaction *tx, const std::vector< std::pair< key_type, value_type > > &pairs, ignite_callback< std::vector< key_type > > callback) |
| std::vector< key_type > | remove_all (transaction *tx, std::vector< std::pair< key_type, value_type > > pairs) |
| void | get_and_remove_async (transaction *tx, const key_type &key, ignite_callback< std::optional< value_type > > callback) |
| std::optional< value_type > | get_and_remove (transaction *tx, const key_type &key) |
| void | replace_async (transaction *tx, const key_type &key, const value_type &value, ignite_callback< bool > callback) |
| bool | replace (transaction *tx, const key_type &key, const value_type &value) |
| void | replace_async (transaction *tx, const key_type &key, const value_type &old_value, const value_type &new_value, ignite_callback< bool > callback) |
| bool | replace (transaction *tx, const key_type &key, const value_type &old_value, const value_type &new_value) |
| void | get_and_replace_async (transaction *tx, const key_type &key, const value_type &value, ignite_callback< std::optional< value_type > > callback) |
| std::optional< value_type > | get_and_replace (transaction *tx, const key_type &key, const value_type &value) |
Friends | |
| class | table |
Key-Value view interface provides methods to access table records in form of separate key and value parts.
|
inlinenodiscard |
Determines if the table contains an entry for the specified key.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
|
inline |
Asynchronously determines if the table contains a value for the specified key.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| callback | Callback which is called on success with value indicating whether value exists or not. |
|
inlinenodiscard |
Gets a value by key.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
std::nullopt otherwise.
|
inlinenodiscard |
Gets multiple values by keys.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| keys | Keys. |
std::nullopt.
|
inline |
Gets multiple values by keys asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| keys | Keys. |
| callback | Callback that is called on operation completion. Called with resulting records with all columns filled from the table. The order of elements is guaranteed to be the same as the order of keys. If a record does not exist, the resulting element of the corresponding order is std::nullopt. |
|
inlinenodiscard |
Puts a value with a given key and returns previous value for the key.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
std::nullopt if it did not exist.
|
inline |
Puts a value with a given key and returns previous value for the key asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
| callback | Callback. Called with a value which contains replaced value or std::nullopt if it did not exist. |
|
inline |
Gets and removes a value associated with the given key.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | key. |
std::nullopt if it did not exist.
|
inline |
Gets and removes a value associated with the given key asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| callback | Callback that is called on operation completion. Called with a removed record or std::nullopt if it did not exist. |
|
inlinenodiscard |
Replaces a record with the given key if it exists returning previous value.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
| callback | A previous value for the given key, or std::nullopt if it did not exist. |
|
inline |
Asynchronously replaces a record with the given key if it exists returning previous value.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
| callback | Callback. Called with a previous value for the given key, or std::nullopt if it did not exist. |
|
inline |
Gets a value by key asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| callback | Callback which is called on success with value if it exists and std::nullopt otherwise |
|
inline |
Puts a value with a given key.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
|
inline |
Puts multiple key-value pairs.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| pairs | Pairs to put. |
|
inline |
Puts multiple key-value pairs asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| pairs | Pairs to put. |
| callback | Callback that is called on operation completion. |
|
inline |
Puts a value with a given key asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
| callback | Callback. |
|
inline |
Puts a value with a given key if the specified key is not present in the table.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
|
inline |
Asynchronously puts a value with a given key if the specified key is not present in the table.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
| callback | Callback. Called with a value indicating whether the record was inserted. Equals false if a record with the same key already exists. |
|
inline |
Removes a value with the specified key.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
|
inline |
Removes a value with a given key from the table only if it is equal to the specified value.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
|
inline |
Removes values with given keys from the table. If one or more keys do not exist, other values are still removed
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| keys | Keys. |
keys that did not exist.
|
inline |
Removes records with given keys and values from the table. If one or more records do not exist, other records are still removed.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| pairs | Pairs to remove. |
records that did not exist.
|
inline |
Removes records with given keys and values from the table asynchronously. If one or more records do not exist, other records are still removed.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| pairs | Pairs to remove. |
| callback | Callback that is called on operation completion. Called with records from records that did not exist. |
|
inline |
Removes values with given keys from the table asynchronously. If one or more keys do not exist, other values are still removed
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| keys | Keys. |
| callback | Callback that is called on operation completion. Called with records from keys that did not exist. |
|
inline |
Asynchronously removes a value with a given key from the table only if it is equal to the specified value.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
| callback | Callback that is called on operation completion. Called with a value indicating whether a record with the specified key was deleted. |
|
inline |
Removes a value with the specified key asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| callback | Callback that is called on operation completion. Called with a value indicating whether a record with the specified key was deleted. |
|
inline |
Replaces a value with a new_value one only if existing value equals to the specified old_value.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| old_value | Value to be replaced. |
| new_value | New value. |
|
inline |
Replaces a record with the same key columns if it exists, otherwise does nothing.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
|
inline |
Asynchronously replaces a value with a new_value one only if existing value equals to the specified old_value.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| old_value | Value to be replaced. |
| new_value | New value. |
| callback | Callback. Called with a value indicating whether a specified record was replaced. |
|
inline |
Asynchronously replaces a record with the specified key if it exists, otherwise does nothing.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
| value | Value. |
| callback | Callback. Called with a value indicating whether a record with the specified key was replaced. |