SQL fields query for thin client.
More...
#include <query_sql_fields.h>
|
class | ignite::impl::thin::SqlFieldsQueryRequest |
|
SQL fields query for thin client.
◆ SqlFieldsQuery() [1/2]
ignite::thin::cache::query::SqlFieldsQuery::SqlFieldsQuery |
( |
const std::string & |
sql | ) |
|
|
inlineexplicit |
◆ SqlFieldsQuery() [2/2]
ignite::thin::cache::query::SqlFieldsQuery::SqlFieldsQuery |
( |
const SqlFieldsQuery & |
other | ) |
|
|
inline |
Copy constructor.
- Parameters
-
◆ AddArgument()
template<typename T >
void ignite::thin::cache::query::SqlFieldsQuery::AddArgument |
( |
const T & |
arg | ) |
|
|
inline |
Add argument for the query.
- Template Parameters
-
T | Type of argument. Should be should be copy-constructable and assignable. BinaryType class template should be specialized for this type. |
- Parameters
-
◆ AddInt8ArrayArgument()
template<typename Iter >
void ignite::thin::cache::query::SqlFieldsQuery::AddInt8ArrayArgument |
( |
Iter |
begin, |
|
|
Iter |
end |
|
) |
| |
|
inline |
Add int8_t array as an argument.
- Template Parameters
-
Iter | Iterator type. Should provide standard iterator functionality. |
- Parameters
-
begin | Begin iterator of sequence to write. |
end | End iterator of sequence to write. |
◆ GetMaxRows()
int32_t ignite::thin::cache::query::SqlFieldsQuery::GetMaxRows |
( |
| ) |
const |
|
inline |
Get maximum number of rows.
- Returns
- Max rows.
◆ GetPageSize()
int32_t ignite::thin::cache::query::SqlFieldsQuery::GetPageSize |
( |
| ) |
const |
|
inline |
Get page size.
- Returns
- Page size.
◆ GetSchema()
const std::string& ignite::thin::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::thin::cache::query::SqlFieldsQuery::GetSql |
( |
| ) |
const |
|
inline |
Get SQL string.
- Returns
- SQL string.
◆ GetTimeout()
int64_t ignite::thin::cache::query::SqlFieldsQuery::GetTimeout |
( |
| ) |
const |
|
inline |
Get query execution timeout in milliseconds.
- Returns
- Timeout in milliseconds.
◆ IsCollocated()
bool ignite::thin::cache::query::SqlFieldsQuery::IsCollocated |
( |
| ) |
|
|
inline |
Checks if this query is collocated.
- Returns
true
If the query is collocated.
◆ IsDistributedJoins()
bool ignite::thin::cache::query::SqlFieldsQuery::IsDistributedJoins |
( |
| ) |
const |
|
inline |
Check if distributed joins are enabled for this query.
- Returns
- True If distributed join enabled.
◆ IsEnforceJoinOrder()
bool ignite::thin::cache::query::SqlFieldsQuery::IsEnforceJoinOrder |
( |
| ) |
const |
|
inline |
Checks if join order of tables if enforced.
- Returns
- Flag value.
◆ IsLazy()
bool ignite::thin::cache::query::SqlFieldsQuery::IsLazy |
( |
| ) |
const |
|
inline |
Gets lazy query execution flag.
See SetLazy(bool) for more information.
- Returns
- Lazy flag.
◆ IsLocal()
bool ignite::thin::cache::query::SqlFieldsQuery::IsLocal |
( |
| ) |
const |
|
inline |
Get local flag.
- Returns
- Local flag.
◆ operator=()
Assignment operator.
- Parameters
-
◆ SetCollocated()
void ignite::thin::cache::query::SqlFieldsQuery::SetCollocated |
( |
bool |
collocated | ) |
|
|
inline |
Sets flag defining if this query is collocated.
Collocation flag is used for optimization purposes of queries with GROUP BY statements. Whenever Ignite executes a distributed query, it sends sub-queries to individual cluster members. If you know in advance that the elements of your query selection are collocated together on the same node and you group by collocated key (primary or affinity key), then Ignite can make significant performance and network optimizations by grouping data on remote nodes.
- Parameters
-
◆ SetDistributedJoins()
void ignite::thin::cache::query::SqlFieldsQuery::SetDistributedJoins |
( |
bool |
enabled | ) |
|
|
inline |
Specify if distributed joins are enabled for this query.
When disabled, join results will only contain collocated 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::thin::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::thin::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::thin::cache::query::SqlFieldsQuery::SetLocal |
( |
bool |
loc | ) |
|
|
inline |
Set local flag.
- Parameters
-
◆ SetMaxRows()
void ignite::thin::cache::query::SqlFieldsQuery::SetMaxRows |
( |
int32_t |
maxRows | ) |
|
|
inline |
Set maximum number of rows.
- Parameters
-
◆ SetPageSize()
void ignite::thin::cache::query::SqlFieldsQuery::SetPageSize |
( |
int32_t |
pageSize | ) |
|
|
inline |
Set page size.
- Parameters
-
◆ SetSchema()
void ignite::thin::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::thin::cache::query::SqlFieldsQuery::SetSql |
( |
const std::string & |
sql | ) |
|
|
inline |
Set SQL string.
- Parameters
-
◆ SetTimeout()
void ignite::thin::cache::query::SqlFieldsQuery::SetTimeout |
( |
int64_t |
timeout | ) |
|
|
inline |
Set query execution timeout in milliseconds.
- Parameters
-
timeout | Timeout in milliseconds. |
◆ Swap()
void ignite::thin::cache::query::SqlFieldsQuery::Swap |
( |
SqlFieldsQuery & |
other | ) |
|
|
inline |
Efficiently swaps contents with another SqlQuery instance.
- Parameters
-
The documentation for this class was generated from the following file: