![]() |
Apache Ignite C++
|
Sql fields query. More...
#include <query_sql_fields.h>
Public Member Functions | |
SqlFieldsQuery (const std::string &sql) | |
Constructor. More... | |
SqlFieldsQuery (const std::string &sql, bool loc) | |
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... | |
int32_t | GetPageSize () const |
Get page size. More... | |
void | SetPageSize (int32_t pageSize) |
Set page size. More... | |
bool | IsLocal () const |
Get local flag. More... | |
void | SetLocal (bool loc) |
Set local flag. More... | |
bool | IsLazy () const |
Gets lazy query execution flag. More... | |
void | SetLazy (bool lazy) |
Sets lazy query execution flag. 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 | 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... | |
template<typename T > | |
void | AddArgument (const T &arg) |
Add argument. More... | |
void | AddInt8ArrayArgument (const int8_t *src, int32_t len) |
Add array of bytes as an argument. More... | |
void | ClearArguments () |
Remove all added arguments. | |
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... | |
void | Write (binary::BinaryRawWriter &writer) const |
Write query info to the stream. More... | |
Sql fields query.
|
inline |
Constructor.
sql | SQL string. |
|
inline |
Constructor.
sql | SQL string. |
loc | Whether query should be executed locally. |
|
inline |
Copy constructor.
other | Other instance. |
|
inline |
Add argument.
Template argument type should be copy-constructable and assignable. Also BinaryType class template should be specialized for this type.
arg | Argument. |
|
inline |
Add array of bytes as an argument.
src | Array pointer. |
len | Array length in bytes. |
|
inline |
Get page size.
|
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 |
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 |
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.
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. |
|
inline |
Set page size.
pageSize | Page size. |
|
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 |
Efficiently swaps contents with another SqlQuery instance.
other | Other instance. |
|
inline |
Write query info to the stream.
writer | Writer. |