![]() |
GridGain C++
|
SQL fields query for thin client. More...
#include <query_sql_fields.h>
Public Member Functions | |
SqlFieldsQuery (const std::string &sql) | |
Constructor. More... | |
SqlFieldsQuery (const SqlFieldsQuery &other) | |
Copy constructor. More... | |
SqlFieldsQuery & | operator= (const SqlFieldsQuery &other) |
Assignment operator. More... | |
~SqlFieldsQuery () | |
Destructor. | |
void | Swap (SqlFieldsQuery &other) |
Efficiently swaps contents with another SqlQuery instance. More... | |
const std::string & | GetSql () const |
Get SQL string. More... | |
void | SetSql (const std::string &sql) |
Set SQL string. More... | |
void | SetSchema (const std::string &schema) |
Set schema name for the query. More... | |
const std::string & | GetSchema () const |
Get schema name for the query. More... | |
int32_t | GetPageSize () const |
Get page size. More... | |
void | SetPageSize (int32_t pageSize) |
Set page size. More... | |
void | SetMaxRows (int32_t maxRows) |
Set maximum number of rows. More... | |
int32_t | GetMaxRows () const |
Get maximum number of rows. More... | |
void | SetTimeout (int64_t timeout) |
Set query execution timeout in milliseconds. More... | |
int64_t | GetTimeout () const |
Get query execution timeout in milliseconds. More... | |
bool | IsLocal () const |
Get local flag. More... | |
void | SetLocal (bool loc) |
Set local flag. More... | |
bool | IsDistributedJoins () const |
Check if distributed joins are enabled for this query. More... | |
void | SetDistributedJoins (bool enabled) |
Specify if distributed joins are enabled for this query. More... | |
bool | IsEnforceJoinOrder () const |
Checks if join order of tables if enforced. More... | |
void | SetEnforceJoinOrder (bool enforce) |
Sets flag to enforce join order of tables in the query. More... | |
bool | IsLazy () const |
Gets lazy query execution flag. More... | |
void | SetLazy (bool lazy) |
Sets lazy query execution flag. More... | |
bool | IsCollocated () |
Checks if this query is collocated. More... | |
void | SetCollocated (bool collocated) |
Sets flag defining if this query is collocated. More... | |
const std::vector< int32_t > & | GetPartitions () const |
Get partitions for the query. More... | |
void | SetPartitions (const std::vector< int32_t > &partitions) |
Set partitions for the query. More... | |
void | SetUpdateBatchSize (int32_t size) |
Set batch size for update queries. More... | |
int32_t | GetUpdateBatchSize () const |
Get batch size for update queries. More... | |
template<typename T > | |
void | AddArgument (const T &arg) |
Add argument for the query. More... | |
template<typename Iter > | |
void | AddInt8ArrayArgument (Iter begin, Iter end) |
Add int8_t array as an argument. More... | |
void | ClearArguments () |
Remove all added arguments. | |
Friends | |
class | ignite::impl::thin::SqlFieldsQueryRequest |
SQL fields query for thin client.
|
inlineexplicit |
Constructor.
sql | SQL string. |
|
inline |
Copy constructor.
other | Other instance. |
|
inline |
Add argument for the query.
T | Type of argument. Should be copy-constructable and assignable. BinaryType class template should be specialized for this type. |
arg | Argument. |
|
inline |
Add int8_t array as an argument.
Iter | Iterator type. Should provide standard iterator functionality. |
begin | Begin iterator of sequence to write. |
end | End iterator of sequence to write. |
|
inline |
Get maximum number of rows.
|
inline |
Get page size.
|
inline |
Get partitions for the query.
The query will be executed only on nodes which are primary for specified partitions.
|
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.
|
inline |
Get SQL string.
|
inline |
Get query execution timeout in milliseconds.
|
inline |
Get batch size for update queries.
|
inline |
Checks if this query is collocated.
true
If the query is collocated.
|
inline |
Check if distributed joins are enabled for this query.
|
inline |
Checks if join order of tables if enforced.
|
inline |
|
inline |
Get local flag.
|
inline |
Assignment operator.
other | Other instance. |
|
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.
collocated | Flag value. |
|
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.
enabled | Distributed joins enabled. |
|
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.
enforce | Flag value. |
|
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.
lazy | Lazy query execution flag. |
|
inline |
Set local flag.
loc | Local flag. If true, query will be executed only on the single connected node, so only local entries will be returned as query result. Should be used with caution because if the client connected to multiple nodes, a single node will be selected randomly. |
|
inline |
Set maximum number of rows.
maxRows | Max rows. |
|
inline |
Set page size.
pageSize | Page size. |
|
inline |
Set partitions for the query.
The query will be executed only on nodes which are primary for specified partitions.
partitions | Partitions for the query. |
|
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.
schema | Schema. Empty string to unset. |
|
inline |
Set SQL string.
sql | SQL string. |
|
inline |
Set query execution timeout in milliseconds.
timeout | Timeout in milliseconds. |
|
inline |
Set batch size for update queries.
size | Batch size for update queries. |
|
inline |
Efficiently swaps contents with another SqlQuery instance.
other | Other instance. |