 |
Apache Ignite C++
|
Go to the documentation of this file.
23 #ifndef _IGNITE_THIN_CACHE_QUERY_QUERY_SQL_FIELDS
24 #define _IGNITE_THIN_CACHE_QUERY_QUERY_SQL_FIELDS
30 #include <ignite/impl/thin/copyable_writable.h>
39 class SqlFieldsQueryRequest;
55 friend class ignite::impl::thin::SqlFieldsQueryRequest;
69 distributedJoins(false),
70 enforceJoinOrder(false),
86 pageSize(other.pageSize),
87 maxRows(other.maxRows),
88 timeout(other.timeout),
90 distributedJoins(other.distributedJoins),
91 enforceJoinOrder(other.enforceJoinOrder),
93 collocated(other.collocated),
96 args.reserve(other.args.size());
98 typedef std::vector<impl::thin::CopyableWritable*>::const_iterator Iter;
100 for (Iter i = other.args.begin(); i != other.args.end(); ++i)
101 args.push_back((*i)->Copy());
140 swap(sql, other.sql);
141 swap(schema, other.schema);
142 swap(pageSize, other.pageSize);
143 swap(maxRows, other.maxRows);
144 swap(timeout, other.timeout);
145 swap(loc, other.loc);
146 swap(distributedJoins, other.distributedJoins);
147 swap(enforceJoinOrder, other.enforceJoinOrder);
148 swap(lazy, other.lazy);
149 swap(collocated, other.collocated);
150 swap(args, other.args);
183 this->schema = schema;
216 this->pageSize = pageSize;
226 this->maxRows = maxRows;
246 this->timeout = timeout;
286 return distributedJoins;
299 distributedJoins = enabled;
309 return enforceJoinOrder;
325 enforceJoinOrder = enforce;
383 this->collocated = collocated;
397 args.push_back(
new impl::thin::CopyableWritableImpl<T>(arg));
408 template<
typename Iter>
411 args.push_back(
new impl::thin::CopyableWritableInt8ArrayImpl<Iter>(begin, end));
419 std::vector<impl::thin::CopyableWritable*>::iterator iter;
420 for (iter = args.begin(); iter != args.end(); ++iter)
446 bool distributedJoins;
449 bool enforceJoinOrder;
458 std::vector<impl::thin::CopyableWritable*> args;
465 #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:134
SqlFieldsQuery(const SqlFieldsQuery &other)
Copy constructor.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:83
bool IsCollocated()
Checks if this query is collocated.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:365
Apache Ignite API.
Definition: cache.h:48
void SetMaxRows(int32_t maxRows)
Set maximum number of rows.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:224
int64_t GetTimeout() const
Get query execution timeout in milliseconds.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:254
bool IsLazy() const
Gets lazy query execution flag.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:335
SqlFieldsQuery(const std::string &sql)
Constructor.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:62
void SetSql(const std::string &sql)
Set SQL string.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:169
~SqlFieldsQuery()
Destructor.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:124
void SetCollocated(bool collocated)
Sets flag defining if this query is collocated.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:381
SQL fields query for thin client.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:52
void SetLocal(bool loc)
Set local flag.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:274
const std::string & GetSql() const
Get SQL string.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:159
SqlFieldsQuery & operator=(const SqlFieldsQuery &other)
Assignment operator.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:109
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:409
void ClearArguments()
Remove all added arguments.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:417
bool IsEnforceJoinOrder() const
Checks if join order of tables if enforced.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:307
bool IsLocal() const
Get local flag.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:264
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:323
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:297
void SetSchema(const std::string &schema)
Set schema name for the query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:181
void AddArgument(const T &arg)
Add argument for the query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:395
void SetPageSize(int32_t pageSize)
Set page size.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:214
int32_t GetMaxRows() const
Get maximum number of rows.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:234
int32_t GetPageSize() const
Get page size.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:204
void SetLazy(bool lazy)
Sets lazy query execution flag.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:355
void SetTimeout(int64_t timeout)
Set query execution timeout in milliseconds.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:244
const std::string & GetSchema() const
Get schema name for the query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:194
bool IsDistributedJoins() const
Check if distributed joins are enabled for this query.
Definition: thin-client/include/ignite/thin/cache/query/query_sql_fields.h:284