![]() |
Apache Ignite C++ Client
|
#include <record_view.h>
Public Types | |
| typedef std::decay< T >::type | value_type |
Public Member Functions | |
| record_view (const record_view &)=delete | |
| record_view & | operator= (const record_view &)=delete |
| record_view (record_view &&) noexcept=default | |
| record_view & | operator= (record_view &&) noexcept=default |
| void | get_async (transaction *tx, const value_type &key, ignite_callback< std::optional< value_type > > callback) |
| std::optional< value_type > | get (transaction *tx, const value_type &key) |
| void | get_all_async (transaction *tx, std::vector< value_type > keys, ignite_callback< std::vector< std::optional< value_type > > > callback) |
| std::vector< std::optional< value_type > > | get_all (transaction *tx, std::vector< value_type > keys) |
| void | upsert_async (transaction *tx, const value_type &record, ignite_callback< void > callback) |
| void | upsert (transaction *tx, const value_type &record) |
| void | upsert_all_async (transaction *tx, std::vector< value_type > records, ignite_callback< void > callback) |
| void | upsert_all (transaction *tx, std::vector< value_type > records) |
| void | get_and_upsert_async (transaction *tx, const value_type &record, ignite_callback< std::optional< value_type > > callback) |
| std::optional< value_type > | get_and_upsert (transaction *tx, const value_type &record) |
| void | insert_async (transaction *tx, const value_type &record, ignite_callback< bool > callback) |
| bool | insert (transaction *tx, const value_type &record) |
| void | insert_all_async (transaction *tx, std::vector< value_type > records, ignite_callback< std::vector< value_type > > callback) |
| std::vector< value_type > | insert_all (transaction *tx, std::vector< value_type > records) |
| void | replace_async (transaction *tx, const value_type &record, ignite_callback< bool > callback) |
| bool | replace (transaction *tx, const value_type &record) |
| void | replace_async (transaction *tx, const value_type &record, const value_type &new_record, ignite_callback< bool > callback) |
| bool | replace (transaction *tx, const value_type &record, const value_type &new_record) |
| void | get_and_replace_async (transaction *tx, const value_type &record, ignite_callback< std::optional< value_type > > callback) |
| std::optional< value_type > | get_and_replace (transaction *tx, const value_type &record) |
| void | remove_async (transaction *tx, const value_type &key, ignite_callback< bool > callback) |
| bool | remove (transaction *tx, const value_type &record) |
| void | remove_exact_async (transaction *tx, const value_type &record, ignite_callback< bool > callback) |
| bool | remove_exact (transaction *tx, const value_type &record) |
| void | get_and_remove_async (transaction *tx, const value_type &key, ignite_callback< std::optional< value_type > > callback) |
| std::optional< value_type > | get_and_remove (transaction *tx, const value_type &key) |
| void | remove_all_async (transaction *tx, std::vector< value_type > keys, ignite_callback< std::vector< value_type > > callback) |
| std::vector< value_type > | remove_all (transaction *tx, std::vector< value_type > keys) |
| void | remove_all_exact_async (transaction *tx, std::vector< value_type > records, ignite_callback< std::vector< value_type > > callback) |
| std::vector< value_type > | remove_all_exact (transaction *tx, std::vector< value_type > records) |
Friends | |
| class | table |
Record view interface provides methods to access table records.
|
inlinenodiscard |
Gets a record by key.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | Key. |
std::nullopt otherwise.
|
inlinenodiscard |
Gets multiple records by keys.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| keys | Keys. |
std::nullopt.
|
inline |
Gets multiple records 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. |
|
inline |
Gets and deletes a record with the specified key.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | A record with key columns set. |
std::nullopt if it did not exist.
|
inline |
Gets and deletes a record with the specified key asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | A record with key columns set. |
| callback | Callback that is called on operation completion. Called with a deleted record or std::nullopt if it did not exist. |
|
inlinenodiscard |
Replaces a record with the same key columns if it exists returning previous record value.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | A record to insert. |
| callback | A previous value for the given key, or std::nullopt if it did not exist. |
|
inline |
Asynchronously replaces a record with the same key columns if it exists returning previous record value.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | A record to insert. |
| callback | Callback. Called with a previous value for the given key, or std::nullopt if it did not exist. |
|
inlinenodiscard |
Inserts a record into the table and returns previous record.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | A record to upsert. |
std::nullopt if it did not exist.
|
inline |
Inserts a record into the table and returns previous record asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | A record to upsert. |
| callback | Callback. Called with a value which contains replaced record or std::nullopt if it did not exist. |
|
inline |
Gets a record 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 |
Inserts a record into the table if does not exist.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | A record to insert into the table. |
|
inline |
Inserts multiple records into the table, skipping existing ones.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| records | Records to insert. |
|
inline |
Inserts multiple records into the table asynchronously, skipping existing ones.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| records | Records to insert. |
| callback | Callback that is called on operation completion. Called with skipped records. |
|
inline |
Inserts a record into the table if it does not exist asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | A record to insert into the table. |
| callback | Callback. Called with a value indicating whether the record was inserted. Equals false if a record with the same key already exists. |
|
inline |
Deletes a record with the specified key.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | A record with key columns set. |
|
inline |
Deletes multiple records from the table If one or more keys do not exist, other records are still deleted
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| keys | Record keys to delete. |
keys that did not exist.
|
inline |
Deletes multiple records from the table asynchronously. If one or more keys do not exist, other records are still deleted
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| keys | Record keys to delete. |
| callback | Callback that is called on operation completion. Called with records from keys that did not exist. |
|
inline |
Deletes multiple exactly matching records. If one or more records do not exist, other records are still deleted.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| records | Records to delete. |
records that did not exist.
|
inline |
Deletes multiple exactly matching records asynchronously. If one or more records do not exist, other records are still deleted.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| records | Records to delete. |
| callback | Callback that is called on operation completion. Called with records from records that did not exist. |
|
inline |
Deletes a record with the specified key asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| key | A record with key columns set. |
| callback | Callback that is called on operation completion. Called with a value indicating whether a record with the specified key was deleted. |
|
inline |
Deletes a record only if all existing columns have the same values as the specified record.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | A record with all columns set. |
|
inline |
Deletes a record only if all existing columns have the same values as the specified record asynchronously.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | A record with all columns set. |
| 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 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. |
| record | A record to insert into the table. |
|
inline |
Replaces a record with a new one only if all existing columns have the same values as the specified record.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | Current value of the record to be replaced. |
| new_record | A record to replace it with. |
|
inline |
Asynchronously replaces a record with a new one only if all existing columns have the same values as the specified record.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | Current value of the record to be replaced. |
| new_record | A record to replace it with. |
| callback | Callback. Called with a value indicating whether a specified record was replaced. |
|
inline |
Asynchronously 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. |
| record | A record to insert into the table. |
| callback | Callback. Called with a value indicating whether a record with the specified key was replaced. |
|
inline |
Inserts a record into the table if does not exist or replaces the existing one.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | A record to insert into the table. The record cannot be nullptr. |
|
inline |
Inserts multiple records into the table, replacing existing.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| records | Records to upsert. |
|
inline |
Inserts multiple records into the table asynchronously, replacing existing.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| records | Records to upsert. |
| callback | Callback that is called on operation completion. |
|
inline |
Inserts a record into the table if does not exist or replaces the existing one.
| tx | Optional transaction. If nullptr implicit transaction for this single operation is used. |
| record | A record to insert into the table. The record cannot be nullptr. |
| callback | Callback. |