23 #ifndef _IGNITE_CACHE_QUERY_QUERY_SQL_FIELDS
24 #define _IGNITE_CACHE_QUERY_QUERY_SQL_FIELDS
54 distributedJoins(false),
55 enforceJoinOrder(false),
71 distributedJoins(false),
72 enforceJoinOrder(false),
85 pageSize(other.pageSize),
87 distributedJoins(other.distributedJoins),
88 enforceJoinOrder(other.enforceJoinOrder),
91 args.reserve(other.args.size());
93 typedef std::vector<QueryArgumentBase*>::const_iterator Iter;
95 for (Iter i = other.args.begin(); i != other.args.end(); ++i)
96 args.push_back((*i)->Copy());
121 typedef std::vector<QueryArgumentBase*>::const_iterator Iter;
123 for (Iter it = args.begin(); it != args.end(); ++it)
136 std::swap(sql, other.sql);
137 std::swap(pageSize, other.pageSize);
138 std::swap(loc, other.loc);
139 std::swap(distributedJoins, other.distributedJoins);
140 std::swap(enforceJoinOrder, other.enforceJoinOrder);
141 std::swap(args, other.args);
182 this->pageSize = pageSize;
212 return enforceJoinOrder;
229 enforceJoinOrder = enforce;
239 return distributedJoins;
252 distributedJoins = enabled;
281 writer.
WriteInt32(static_cast<int32_t>(args.size()));
283 for (std::vector<QueryArgumentBase*>::const_iterator it = args.begin(); it != args.end(); ++it)
284 (*it)->Write(writer);
301 bool distributedJoins;
304 bool enforceJoinOrder;
307 std::vector<QueryArgumentBase*> args;
313 #endif //_IGNITE_CACHE_QUERY_QUERY_SQL_FIELDS
void SetPageSize(int32_t pageSize)
Set page size.
Definition: query_sql_fields.h:180
bool IsDistributedJoins() const
Check if distributed joins are enabled for this query.
Definition: query_sql_fields.h:237
void Swap(SqlFieldsQuery &other)
Efficiently swaps contents with another SqlQuery instance.
Definition: query_sql_fields.h:132
Declares ignite::binary::BinaryRawWriter class.
void WriteInt32(int32_t val)
Write 32-byte signed integer.
Definition: binary_raw_writer.cpp:72
void AddArgument(const T &arg)
Add argument.
Definition: query_sql_fields.h:265
int32_t GetPageSize() const
Get page size.
Definition: query_sql_fields.h:170
void SetEnforceJoinOrder(bool enforce)
Sets flag to enforce join order of tables in the query.
Definition: query_sql_fields.h:227
SqlFieldsQuery(const std::string &sql, bool loc)
Constructor.
Definition: query_sql_fields.h:67
void SetSql(const std::string &sql)
Set SQL string.
Definition: query_sql_fields.h:160
void SetLocal(bool loc)
Set local flag.
Definition: query_sql_fields.h:200
Sql fields query.
Definition: query_sql_fields.h:42
void Write(binary::BinaryRawWriter &writer) const
Write query info to the stream.
Definition: query_sql_fields.h:275
void WriteString(const char *val)
Write string.
Definition: binary_raw_writer.cpp:142
bool IsEnforceJoinOrder() const
Checks if join order of tables if enforced.
Definition: query_sql_fields.h:210
Declares ignite::cache::query::QueryArgument class template and ignite::cache::query::QueryArgumentBa...
bool IsLocal() const
Get local flag.
Definition: query_sql_fields.h:190
Binary raw writer.
Definition: binary_raw_writer.h:55
void WriteBool(bool val)
Write bool.
Definition: binary_raw_writer.cpp:42
SqlFieldsQuery(const std::string &sql)
Constructor.
Definition: query_sql_fields.h:50
~SqlFieldsQuery()
Destructor.
Definition: query_sql_fields.h:119
const std::string & GetSql() const
Get SQL string.
Definition: query_sql_fields.h:150
Apache Ignite API.
Definition: cache.h:43
SqlFieldsQuery(const SqlFieldsQuery &other)
Copy constructor.
Definition: query_sql_fields.h:83
Query argument class template.
Definition: query_argument.h:72
void SetDistributedJoins(bool enabled)
Specify if distributed joins are enabled for this query.
Definition: query_sql_fields.h:250
SqlFieldsQuery & operator=(const SqlFieldsQuery &other)
Assignment operator.
Definition: query_sql_fields.h:104