 |
GridGain C++
|
Go to the documentation of this file.
22 #ifndef _IGNITE_CACHE_QUERY_QUERY_SQL_FIELDS
23 #define _IGNITE_CACHE_QUERY_QUERY_SQL_FIELDS
29 #include <ignite/impl/writable_object.h>
54 distributedJoins(false),
55 enforceJoinOrder(false),
73 distributedJoins(false),
74 enforceJoinOrder(false),
89 pageSize(other.pageSize),
91 distributedJoins(other.distributedJoins),
92 enforceJoinOrder(other.enforceJoinOrder),
96 args.reserve(other.args.size());
98 typedef std::vector<impl::WritableObjectBase*>::const_iterator Iter;
100 for (Iter i = other.args.begin(); i != other.args.end(); ++i)
101 args.push_back((*i)->Copy());
126 typedef std::vector<impl::WritableObjectBase*>::const_iterator Iter;
128 for (Iter it = args.begin(); it != args.end(); ++it)
143 swap(sql, other.sql);
144 swap(schema, other.schema);
145 swap(pageSize, other.pageSize);
146 swap(loc, other.loc);
147 swap(distributedJoins, other.distributedJoins);
148 swap(enforceJoinOrder, other.enforceJoinOrder);
149 swap(lazy, other.lazy);
150 swap(args, other.args);
191 this->pageSize = pageSize;
255 return enforceJoinOrder;
270 enforceJoinOrder = enforce;
280 return distributedJoins;
293 distributedJoins = enabled;
307 args.push_back(
new impl::WritableObject<T>(arg));
318 args.push_back(
new impl::WritableObjectInt8Array(src, len));
326 std::vector<impl::WritableObjectBase*>::iterator iter;
327 for (iter = args.begin(); iter != args.end(); ++iter)
342 this->schema = schema;
369 writer.
WriteInt32(
static_cast<int32_t
>(args.size()));
371 std::vector<impl::WritableObjectBase*>::const_iterator it;
373 for (it = args.begin(); it != args.end(); ++it)
374 (*it)->Write(writer);
406 bool distributedJoins;
409 bool enforceJoinOrder;
415 std::vector<impl::WritableObjectBase*> args;
421 #endif //_IGNITE_CACHE_QUERY_QUERY_SQL_FIELDS
void SetLazy(bool lazy)
Sets lazy query execution flag.
Definition: core/include/ignite/cache/query/query_sql_fields.h:243
Ignite API.
Definition: cache.h:47
SqlFieldsQuery(const SqlFieldsQuery &other)
Copy constructor.
Definition: core/include/ignite/cache/query/query_sql_fields.h:86
void WriteInt32(int32_t val)
Write 32-byte signed integer.
Definition: binary_raw_writer.cpp:71
bool IsDistributedJoins() const
Check if distributed joins are enabled for this query.
Definition: core/include/ignite/cache/query/query_sql_fields.h:278
void AddArgument(const T &arg)
Add argument.
Definition: core/include/ignite/cache/query/query_sql_fields.h:305
const std::string & GetSql() const
Get SQL string.
Definition: core/include/ignite/cache/query/query_sql_fields.h:159
SqlFieldsQuery(const std::string &sql, bool loc)
Constructor.
Definition: core/include/ignite/cache/query/query_sql_fields.h:68
void Swap(SqlFieldsQuery &other)
Efficiently swaps contents with another SqlQuery instance.
Definition: core/include/ignite/cache/query/query_sql_fields.h:137
void SetSchema(const std::string &schema)
Set schema name for the query.
Definition: core/include/ignite/cache/query/query_sql_fields.h:340
void SetPageSize(int32_t pageSize)
Set page size.
Definition: core/include/ignite/cache/query/query_sql_fields.h:189
void WriteInt32Array(const int32_t *val, int32_t len)
Write array of 32-byte signed integers.
Definition: binary_raw_writer.cpp:76
void AddInt8ArrayArgument(const int8_t *src, int32_t len)
Add array of bytes as an argument.
Definition: core/include/ignite/cache/query/query_sql_fields.h:316
void Write(binary::BinaryRawWriter &writer) const
Write query info to the stream.
Definition: core/include/ignite/cache/query/query_sql_fields.h:363
void SetLocal(bool loc)
Set local flag.
Definition: core/include/ignite/cache/query/query_sql_fields.h:211
Binary raw writer.
Definition: binary_raw_writer.h:61
SqlFieldsQuery & operator=(const SqlFieldsQuery &other)
Assignment operator.
Definition: core/include/ignite/cache/query/query_sql_fields.h:109
void SetEnforceJoinOrder(bool enforce)
Sets flag to enforce join order of tables in the query.
Definition: core/include/ignite/cache/query/query_sql_fields.h:268
void WriteString(const char *val)
Write string.
Definition: binary_raw_writer.cpp:151
~SqlFieldsQuery()
Destructor.
Definition: core/include/ignite/cache/query/query_sql_fields.h:124
const std::string & GetSchema() const
Get schema name for the query.
Definition: core/include/ignite/cache/query/query_sql_fields.h:353
void WriteBool(bool val)
Write bool.
Definition: binary_raw_writer.cpp:41
void SetSql(const std::string &sql)
Set SQL string.
Definition: core/include/ignite/cache/query/query_sql_fields.h:169
SqlFieldsQuery(const std::string &sql)
Constructor.
Definition: core/include/ignite/cache/query/query_sql_fields.h:49
void ClearArguments()
Remove all added arguments.
Definition: core/include/ignite/cache/query/query_sql_fields.h:324
Sql fields query.
Definition: core/include/ignite/cache/query/query_sql_fields.h:41
int32_t GetPageSize() const
Get page size.
Definition: core/include/ignite/cache/query/query_sql_fields.h:179
bool IsEnforceJoinOrder() const
Checks if join order of tables if enforced.
Definition: core/include/ignite/cache/query/query_sql_fields.h:253
bool IsLazy() const
Gets lazy query execution flag.
Definition: core/include/ignite/cache/query/query_sql_fields.h:223
void SetDistributedJoins(bool enabled)
Specify if distributed joins are enabled for this query.
Definition: core/include/ignite/cache/query/query_sql_fields.h:291
void WriteNull()
Write NULL value.
Definition: binary_raw_writer.cpp:176
bool IsLocal() const
Get local flag.
Definition: core/include/ignite/cache/query/query_sql_fields.h:199