Apache Ignite C++ Client
Loading...
Searching...
No Matches
ignite::tables Class Reference

#include <tables.h>

Public Member Functions

IGNITE_API std::optional< tableget_table (std::string_view name)
IGNITE_API void get_table_async (std::string_view name, ignite_callback< std::optional< table > > callback)
IGNITE_API std::optional< tableget_table (const qualified_name &name)
IGNITE_API void get_table_async (const qualified_name &name, ignite_callback< std::optional< table > > callback)
IGNITE_API std::vector< tableget_tables ()
IGNITE_API void get_tables_async (ignite_callback< std::vector< table > > callback)

Friends

class ignite_client

Detailed Description

Table management.

Member Function Documentation

◆ get_table() [1/2]

std::optional< table > ignite::tables::get_table ( const qualified_name & name)

Gets a table by name if it was created before.

Parameters
nameQualified name of the table.
Returns
An instance of the table with the corresponding name or std::nullopt if the table does not exist.
Exceptions
ignite_errorIn case of error while trying to send a request.

◆ get_table() [2/2]

std::optional< table > ignite::tables::get_table ( std::string_view name)

Gets a table by name if it was created before.

Parameters
nameCanonical name of the table ([schema_name].[table_name]) with SQL-parser style quotation, e.g. "public.tbl0" - the table "PUBLIC.TBL0" will be looked up, "PUBLIC.\"Tbl0\"" - "PUBLIC.Tbl0", "\"MySchema\".\"Tbl0\"" - "MySchema.Tbl0", etc.
Returns
An instance of the table with the corresponding name or std::nullopt if the table does not exist.
Exceptions
ignite_errorIn case of error while trying to send a request.

◆ get_table_async() [1/2]

void ignite::tables::get_table_async ( const qualified_name & name,
ignite_callback< std::optional< table > > callback )

Gets a table by name if it was created before asynchronously.

Parameters
nameQualified name of the table.
callbackCallback to be called once the operation is complete. On success, the callback is invoked with an instance of the table with the corresponding name or std::nullopt if the table does not exist.
Exceptions
ignite_errorIn case of error while trying to send a request.

◆ get_table_async() [2/2]

void ignite::tables::get_table_async ( std::string_view name,
ignite_callback< std::optional< table > > callback )

Gets a table by name if it was created before asynchronously.

Parameters
nameCanonical name of the table ([schema_name].[table_name]) with SQL-parser style quotation, e.g. "public.tbl0" - the table "PUBLIC.TBL0" will be looked up, "PUBLIC.\"Tbl0\"" - "PUBLIC.Tbl0", "\"MySchema\".\"Tbl0\"" - "MySchema.Tbl0", etc.
callbackCallback to be called once the operation is complete. On success, the callback is invoked with an instance of the table with the corresponding name or std::nullopt if the table does not exist.
Exceptions
ignite_errorIn case of error while trying to send a request.

◆ get_tables()

std::vector< table > ignite::tables::get_tables ( )

Gets all tables.

Returns
A vector of all tables.
Exceptions
ignite_errorIn case of error while trying to send a request.

◆ get_tables_async()

void ignite::tables::get_tables_async ( ignite_callback< std::vector< table > > callback)

Gets all tables asynchronously.

Parameters
callbackCallback to be called once the operation is complete. On success, the callback is invoked with a vector of all tables.
Exceptions
ignite_errorIn case of error while trying to send a request.

The documentation for this class was generated from the following files: