Sql fields query.
More...
#include <query_sql_fields.h>
◆ SqlFieldsQuery() [1/3]
ignite::cache::query::SqlFieldsQuery::SqlFieldsQuery |
( |
const std::string & |
sql | ) |
|
|
inline |
◆ SqlFieldsQuery() [2/3]
ignite::cache::query::SqlFieldsQuery::SqlFieldsQuery |
( |
const std::string & |
sql, |
|
|
bool |
loc |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
sql | SQL string. |
loc | Whether query should be executed locally. |
◆ SqlFieldsQuery() [3/3]
ignite::cache::query::SqlFieldsQuery::SqlFieldsQuery |
( |
const SqlFieldsQuery & |
other | ) |
|
|
inline |
Copy constructor.
- Parameters
-
◆ AddArgument()
template<typename T >
void ignite::cache::query::SqlFieldsQuery::AddArgument |
( |
const T & |
arg | ) |
|
|
inline |
Add argument.
Template argument type should be copy-constructable and assignable. Also BinaryType class template should be specialized for this type.
- Parameters
-
◆ AddInt8ArrayArgument()
void ignite::cache::query::SqlFieldsQuery::AddInt8ArrayArgument |
( |
const int8_t * |
src, |
|
|
int32_t |
len |
|
) |
| |
|
inline |
Add array of bytes as an argument.
- Parameters
-
src | Array pointer. |
len | Array length in bytes. |
◆ GetPageSize()
int32_t ignite::cache::query::SqlFieldsQuery::GetPageSize |
( |
| ) |
const |
|
inline |
Get page size.
- Returns
- Page size.
◆ GetSchema()
const std::string& ignite::cache::query::SqlFieldsQuery::GetSchema |
( |
| ) |
const |
|
inline |
Get schema name for the query.
If not set, current cache name is used, which means you can omit schema name for tables within the current cache.
- Returns
- Schema. Empty string if not set.
◆ GetSql()
const std::string& ignite::cache::query::SqlFieldsQuery::GetSql |
( |
| ) |
const |
|
inline |
Get SQL string.
- Returns
- SQL string.
◆ IsDistributedJoins()
bool ignite::cache::query::SqlFieldsQuery::IsDistributedJoins |
( |
| ) |
const |
|
inline |
Check if distributed joins are enabled for this query.
- Returns
- True If distributed joind enabled.
◆ IsEnforceJoinOrder()
bool ignite::cache::query::SqlFieldsQuery::IsEnforceJoinOrder |
( |
| ) |
const |
|
inline |
Checks if join order of tables if enforced.
- Returns
- Flag value.
◆ IsLazy()
bool ignite::cache::query::SqlFieldsQuery::IsLazy |
( |
| ) |
const |
|
inline |
Gets lazy query execution flag.
See SetLazy(bool) for more information.
- Returns
- Lazy flag.
◆ IsLocal()
bool ignite::cache::query::SqlFieldsQuery::IsLocal |
( |
| ) |
const |
|
inline |
Get local flag.
- Returns
- Local flag.
◆ operator=()
Assignment operator.
- Parameters
-
◆ SetDistributedJoins()
void ignite::cache::query::SqlFieldsQuery::SetDistributedJoins |
( |
bool |
enabled | ) |
|
|
inline |
Specify if distributed joins are enabled for this query.
When disabled, join results will only contain colocated data (joins work locally). When enabled, joins work as expected, no matter how the data is distributed.
- Parameters
-
enabled | Distributed joins enabled. |
◆ SetEnforceJoinOrder()
void ignite::cache::query::SqlFieldsQuery::SetEnforceJoinOrder |
( |
bool |
enforce | ) |
|
|
inline |
Sets flag to enforce join order of tables in the query.
If set to true query optimizer will not reorder tables in join. By default is false.
It is not recommended to enable this property unless you are sure that your indexes and the query itself are correct and tuned as much as possible but query optimizer still produces wrong join order.
- Parameters
-
◆ SetLazy()
void ignite::cache::query::SqlFieldsQuery::SetLazy |
( |
bool |
lazy | ) |
|
|
inline |
Sets lazy query execution flag.
By default Ignite attempts to fetch the whole query result set to memory and send it to the client. For small and medium result sets this provides optimal performance and minimize duration of internal database locks, thus increasing concurrency.
If result set is too big to fit in available memory this could lead to excessive GC pauses and even OutOfMemoryError. Use this flag as a hint for Ignite to fetch result set lazily, thus minimizing memory consumption at the cost of moderate performance hit.
Defaults to false
, meaning that the whole result set is fetched to memory eagerly.
- Parameters
-
lazy | Lazy query execution flag. |
◆ SetLocal()
void ignite::cache::query::SqlFieldsQuery::SetLocal |
( |
bool |
loc | ) |
|
|
inline |
Set local flag.
- Parameters
-
val | Value of the flag. If true, query will be executed only on local node, so only local entries will be returned as query result. |
◆ SetPageSize()
void ignite::cache::query::SqlFieldsQuery::SetPageSize |
( |
int32_t |
pageSize | ) |
|
|
inline |
Set page size.
- Parameters
-
◆ SetSchema()
void ignite::cache::query::SqlFieldsQuery::SetSchema |
( |
const std::string & |
schema | ) |
|
|
inline |
Set schema name for the query.
If not set, current cache name is used, which means you can omit schema name for tables within the current cache.
- Parameters
-
schema | Schema. Empty string to unset. |
◆ SetSql()
void ignite::cache::query::SqlFieldsQuery::SetSql |
( |
const std::string & |
sql | ) |
|
|
inline |
Set SQL string.
- Parameters
-
◆ Swap()
void ignite::cache::query::SqlFieldsQuery::Swap |
( |
SqlFieldsQuery & |
other | ) |
|
|
inline |
Efficiently swaps contents with another SqlQuery instance.
- Parameters
-
◆ Write()
Write query info to the stream.
- Parameters
-
The documentation for this class was generated from the following file: