#include <sql_statement.h>
◆ sql_statement()
| ignite::sql_statement::sql_statement |
( |
std::string | query, |
|
|
std::chrono::milliseconds | timeout = DEFAULT_TIMEOUT, |
|
|
std::string | schema = DEFAULT_SCHEMA.data(), |
|
|
std::int32_t | page_size = DEFAULT_PAGE_SIZE, |
|
|
std::initializer_list< std::pair< const std::string, primitive > > | properties = {}, |
|
|
std::string | timezone_id = {} ) |
|
inline |
Constructor.
- Parameters
-
| query | Query text. |
| timeout | Timeout. |
| schema | Schema. |
| page_size | Page size. |
| properties | Properties list. |
| timezone_id | Timezone ID. |
◆ page_size() [1/2]
| std::int32_t ignite::sql_statement::page_size |
( |
| ) |
const |
|
inlinenodiscard |
Gets the number of rows per data page.
- Returns
- Number of rows per data page.
◆ page_size() [2/2]
| void ignite::sql_statement::page_size |
( |
std::int32_t | val | ) |
|
|
inline |
Sets the number of rows per data page.
- Parameters
-
| val | Number of rows per data page. |
◆ properties() [1/2]
| const std::unordered_map< std::string, primitive > & ignite::sql_statement::properties |
( |
| ) |
const |
|
inlinenodiscard |
Gets the statement properties.
- Returns
- Properties.
◆ properties() [2/2]
| void ignite::sql_statement::properties |
( |
std::initializer_list< std::pair< const std::string, primitive > > | val | ) |
|
|
inline |
Sets the statement properties.
- Parameters
-
◆ query() [1/2]
| const std::string & ignite::sql_statement::query |
( |
| ) |
const |
|
inlinenodiscard |
Gets the query text.
- Returns
- Query text.
◆ query() [2/2]
| void ignite::sql_statement::query |
( |
std::string | val | ) |
|
|
inline |
Sets the query text.
- Parameters
-
◆ schema() [1/2]
| const std::string & ignite::sql_statement::schema |
( |
| ) |
const |
|
inlinenodiscard |
Gets the SQL schema name.
- Returns
- Schema name.
◆ schema() [2/2]
| void ignite::sql_statement::schema |
( |
std::string | val | ) |
|
|
inline |
Sets the SQL schema name.
- Parameters
-
◆ timeout() [1/2]
| std::chrono::milliseconds ignite::sql_statement::timeout |
( |
| ) |
const |
|
inlinenodiscard |
Gets the query timeout (zero means no timeout).
- Returns
- Query timeout (zero means no timeout).
◆ timeout() [2/2]
| void ignite::sql_statement::timeout |
( |
std::chrono::milliseconds | val | ) |
|
|
inline |
Sets the query timeout (zero means no timeout).
- Parameters
-
| val | Query timeout (zero means no timeout). |
◆ timezone_id() [1/2]
| const std::string & ignite::sql_statement::timezone_id |
( |
| ) |
const |
|
inlinenodiscard |
Gets the Timezone ID.
- Returns
- Timezone ID.
◆ timezone_id() [2/2]
| void ignite::sql_statement::timezone_id |
( |
std::string | val | ) |
|
|
inline |
Sets the Timezone ID.
Examples: "America/New_York", "UTC+3". Affects time-related SQL functions (e.g. CURRENT_TIME) and string literal conversions (e.g. TIMESTAMP WITH LOCAL TIME ZONE '1992-01-18 02:30:00.123').
If left empty, defaults to server time zone.
- Parameters
-
◆ DEFAULT_PAGE_SIZE
| std::int32_t ignite::sql_statement::DEFAULT_PAGE_SIZE {1024} |
|
staticconstexpr |
Default number of rows per data page.
◆ DEFAULT_SCHEMA
| std::string_view ignite::sql_statement::DEFAULT_SCHEMA {"PUBLIC"} |
|
staticconstexpr |
◆ DEFAULT_TIMEOUT
| std::chrono::milliseconds ignite::sql_statement::DEFAULT_TIMEOUT {0} |
|
staticconstexpr |
Default query timeout (zero means no timeout).
The documentation for this class was generated from the following file: