 |
GridGain C++
|
Go to the documentation of this file.
22 #ifndef _IGNITE_THIN_CACHE_QUERY_QUERY_SQL_FIELDS
23 #define _IGNITE_THIN_CACHE_QUERY_QUERY_SQL_FIELDS
29 #include <ignite/impl/thin/copyable_writable.h>
38 class SqlFieldsQueryRequest;
54 friend class ignite::impl::thin::SqlFieldsQueryRequest;
68 distributedJoins(false),
69 enforceJoinOrder(false),
87 pageSize(other.pageSize),
88 maxRows(other.maxRows),
89 timeout(other.timeout),
91 distributedJoins(other.distributedJoins),
92 enforceJoinOrder(other.enforceJoinOrder),
94 collocated(other.collocated),
96 updateBatchSize(other.updateBatchSize),
99 args.reserve(other.args.size());
101 typedef std::vector<impl::thin::CopyableWritable*>::const_iterator Iter;
103 for (Iter i = other.args.begin(); i != other.args.end(); ++i)
104 args.push_back((*i)->Copy());
143 swap(sql, other.sql);
144 swap(schema, other.schema);
145 swap(pageSize, other.pageSize);
146 swap(maxRows, other.maxRows);
147 swap(timeout, other.timeout);
148 swap(loc, other.loc);
149 swap(distributedJoins, other.distributedJoins);
150 swap(enforceJoinOrder, other.enforceJoinOrder);
151 swap(lazy, other.lazy);
152 swap(collocated, other.collocated);
153 swap(parts, other.parts);
154 swap(args, other.args);
187 this->schema = schema;
220 this->pageSize = pageSize;
230 this->maxRows = maxRows;
250 this->timeout = timeout;
294 return distributedJoins;
307 distributedJoins = enabled;
317 return enforceJoinOrder;
333 enforceJoinOrder = enforce;
391 this->collocated = collocated;
415 this->parts = partitions;
425 updateBatchSize = size;
435 return updateBatchSize;
449 args.push_back(
new impl::thin::CopyableWritableImpl<T>(arg));
460 template<
typename Iter>
463 args.push_back(
new impl::thin::CopyableWritableInt8ArrayImpl<Iter>(begin, end));
471 std::vector<impl::thin::CopyableWritable*>::iterator iter;
472 for (iter = args.begin(); iter != args.end(); ++iter)
498 bool distributedJoins;
501 bool enforceJoinOrder;
510 std::vector<int32_t> parts;
513 int32_t updateBatchSize;
516 std::vector<impl::thin::CopyableWritable*> args;
523 #endif //_IGNITE_THIN_CACHE_QUERY_QUERY_SQL_FIELDS
void Swap(SqlFieldsQuery &other)
Efficiently swaps contents with another SqlQuery instance.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:137
SqlFieldsQuery(const SqlFieldsQuery &other)
Copy constructor.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:84
bool IsCollocated()
Checks if this query is collocated.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:373
Ignite API.
Definition: cache.h:47
void SetMaxRows(int32_t maxRows)
Set maximum number of rows.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:228
int64_t GetTimeout() const
Get query execution timeout in milliseconds.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:258
void SetUpdateBatchSize(int32_t size)
Set batch size for update queries.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:423
bool IsLazy() const
Gets lazy query execution flag.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:343
SqlFieldsQuery(const std::string &sql)
Constructor.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:61
void SetSql(const std::string &sql)
Set SQL string.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:173
~SqlFieldsQuery()
Destructor.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:127
void SetCollocated(bool collocated)
Sets flag defining if this query is collocated.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:389
SQL fields query for thin client.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:51
void SetLocal(bool loc)
Set local flag.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:282
const std::string & GetSql() const
Get SQL string.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:163
SqlFieldsQuery & operator=(const SqlFieldsQuery &other)
Assignment operator.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:112
void AddInt8ArrayArgument(Iter begin, Iter end)
Add int8_t array as an argument.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:461
void ClearArguments()
Remove all added arguments.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:469
int32_t GetUpdateBatchSize() const
Get batch size for update queries.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:433
bool IsEnforceJoinOrder() const
Checks if join order of tables if enforced.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:315
bool IsLocal() const
Get local flag.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:270
void SetPartitions(const std::vector< int32_t > &partitions)
Set partitions for the query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:413
void SetEnforceJoinOrder(bool enforce)
Sets flag to enforce join order of tables in the query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:331
void SetDistributedJoins(bool enabled)
Specify if distributed joins are enabled for this query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:305
void SetSchema(const std::string &schema)
Set schema name for the query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:185
void AddArgument(const T &arg)
Add argument for the query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:447
void SetPageSize(int32_t pageSize)
Set page size.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:218
int32_t GetMaxRows() const
Get maximum number of rows.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:238
int32_t GetPageSize() const
Get page size.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:208
void SetLazy(bool lazy)
Sets lazy query execution flag.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:363
void SetTimeout(int64_t timeout)
Set query execution timeout in milliseconds.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:248
const std::string & GetSchema() const
Get schema name for the query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:198
const std::vector< int32_t > & GetPartitions() const
Get partitions for the query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:401
bool IsDistributedJoins() const
Check if distributed joins are enabled for this query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:292