userver: ydb::TableClient Class Reference
Loading...
Searching...
No Matches
ydb::TableClient Class Referencefinal

Detailed Description

Definition at line 40 of file table.hpp.

Public Member Functions

void ExecuteSchemeQuery (const std::string &query)
 Query for creating/deleting tables.
 
void MakeDirectory (const std::string &path)
 
void RemoveDirectory (const std::string &path)
 
NYdb::NScheme::TDescribePathResult DescribePath (std::string_view path)
 
NYdb::NScheme::TListDirectoryResult ListDirectory (std::string_view path)
 
NYdb::NTable::TDescribeTableResult DescribeTable (std::string_view path)
 
void CreateTable (std::string_view path, NYdb::NTable::TTableDescription &&table_desc)
 
void DropTable (std::string_view path)
 
PreparedArgsBuilder GetBuilder () const
 Builder for storing dynamic query params.
 
void BulkUpsert (std::string_view table, NYdb::TValue &&rows, OperationSettings settings={})
 Efficiently write large ranges of table data.
 
template<typename RangeOfStructs >
void BulkUpsert (std::string_view table, const RangeOfStructs &rows, OperationSettings settings={})
 
ReadTableResults ReadTable (std::string_view table, NYdb::NTable::TReadTableSettings &&read_settings={}, OperationSettings settings={})
 Efficiently read large ranges of table data.
 
NYdb::NTable::TTableClient & GetNativeTableClient ()
 
utils::RetryBudgetGetRetryBudget ()
 
Data queries execution

Execute a single data query outside of transactions. Query parameters are passed in Args as "string key - value" pairs:

client.ExecuteDataQuery(query, "name1", value1, "name2", value2, ...);

Use ydb::PreparedArgsBuilder for storing a generic buffer of query params if needed.

template<typename... Args>
ExecuteResponse ExecuteDataQuery (const Query &query, Args &&... args)
 
template<typename... Args>
ExecuteResponse ExecuteDataQuery (OperationSettings settings, const Query &query, Args &&... args)
 
ExecuteResponse ExecuteDataQuery (OperationSettings settings, const Query &query, PreparedArgsBuilder &&builder)
 
ExecuteResponse ExecuteDataQuery (QuerySettings query_settings, OperationSettings settings, const Query &query, PreparedArgsBuilder &&builder)
 
Transactions

Begin a transaction with the specified name. The settings are used for the BEGIN statement.

See also
ydb::Transaction
Transaction Begin (std::string transaction_name, OperationSettings settings={})
 
Transaction Begin (std::string transaction_name, TransactionMode tx_mode)
 
Scan queries execution

A separate data access interface designed primarily for performing analytical ad-hoc queries.

template<typename... Args>
ScanQueryResults ExecuteScanQuery (const Query &query, Args &&... args)
 
template<typename... Args>
ScanQueryResults ExecuteScanQuery (ScanQuerySettings &&scan_settings, OperationSettings settings, const Query &query, Args &&... args)
 
ScanQueryResults ExecuteScanQuery (ScanQuerySettings &&scan_settings, OperationSettings settings, const Query &query, PreparedArgsBuilder &&builder)
 

Member Function Documentation

◆ BulkUpsert()

template<typename RangeOfStructs >
void ydb::TableClient::BulkUpsert ( std::string_view table,
const RangeOfStructs & rows,
OperationSettings settings = {} )

Efficiently write large ranges of table data. The passed range of structs is serialized to TValue.

Definition at line 210 of file table.hpp.

◆ ExecuteDataQuery() [1/2]

template<typename... Args>
ExecuteResponse ydb::TableClient::ExecuteDataQuery ( const Query & query,
Args &&... args )

Definition at line 200 of file table.hpp.

◆ ExecuteDataQuery() [2/2]

template<typename... Args>
ExecuteResponse ydb::TableClient::ExecuteDataQuery ( OperationSettings settings,
const Query & query,
Args &&... args )

Definition at line 205 of file table.hpp.

◆ ExecuteScanQuery() [1/2]

template<typename... Args>
ScanQueryResults ydb::TableClient::ExecuteScanQuery ( const Query & query,
Args &&... args )

Definition at line 217 of file table.hpp.

◆ ExecuteScanQuery() [2/2]

template<typename... Args>
ScanQueryResults ydb::TableClient::ExecuteScanQuery ( ScanQuerySettings && scan_settings,
OperationSettings settings,
const Query & query,
Args &&... args )

Definition at line 222 of file table.hpp.

◆ GetNativeTableClient()

NYdb::NTable::TTableClient & ydb::TableClient::GetNativeTableClient ( )

Get native table client

Warning
Use with care! Facilities from <core/include/userver/drivers/subscribable_futures.hpp> can help with non-blocking wait operations.

Friends And Related Symbol Documentation

◆ Transaction

friend class Transaction
friend

Definition at line 157 of file table.hpp.


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