15 #ifndef _GRIDGAIN_CACHE_QUERY_SQL_FIELDS 16 #define _GRIDGAIN_CACHE_QUERY_SQL_FIELDS 42 SqlFieldsQuery(
const std::string& sql) : sql(sql), pageSize(1024), loc(false), args()
53 SqlFieldsQuery(
const std::string& sql,
bool loc) : sql(sql), pageSize(1024), loc(false), args()
66 args.reserve(other.args.size());
68 for (std::vector<QueryArgumentBase*>::const_iterator i = other.args.begin(); i != other.args.end(); ++i)
70 args.push_back((*i)->Copy());
96 for (std::vector<QueryArgumentBase*>::iterator it = args.begin(); it != args.end(); ++it)
109 std::swap(sql, other.sql);
110 std::swap(pageSize, other.pageSize);
111 std::swap(loc, other.loc);
112 std::swap(args, other.args);
153 this->pageSize = pageSize;
198 writer.
WriteInt32(static_cast<int32_t>(args.size()));
200 for (std::vector<QueryArgumentBase*>::const_iterator it = args.begin(); it != args.end(); ++it)
201 (*it)->Write(writer);
218 std::vector<QueryArgumentBase*> args;
void SetLocal(bool loc)
Set local flag.
Definition: query_sql_fields.h:171
void AddArgument(const T &arg)
Add argument.
Definition: query_sql_fields.h:182
void SetSql(const std::string &sql)
Set SQL string.
Definition: query_sql_fields.h:131
SqlFieldsQuery(const std::string &sql, bool loc)
Constructor.
Definition: query_sql_fields.h:53
void WriteInt32(int32_t val)
Write 32-byte signed integer.
Definition: portable_raw_writer.cpp:64
void Write(portable::PortableRawWriter &writer) const
Write query info to the stream.
Definition: query_sql_fields.h:192
void Swap(SqlFieldsQuery &other)
Efficiently swaps contents with another SqlFieldsQuery instance.
Definition: query_sql_fields.h:105
Query argument.
Definition: query_argument.h:58
Sql fields query.
Definition: query_sql_fields.h:34
int32_t GetPageSize() const
Get page size.
Definition: query_sql_fields.h:141
void WriteString(const char *val)
Write string.
Definition: portable_raw_writer.cpp:114
Declares gridgain::cache::query::QueryArgument class template and gridgain::cache::query::QueryArgume...
SqlFieldsQuery(const SqlFieldsQuery &other)
Copy constructor.
Definition: query_sql_fields.h:63
SqlFieldsQuery & operator=(const SqlFieldsQuery &other)
Assignment operator.
Definition: query_sql_fields.h:79
void SetPageSize(int32_t pageSize)
Set page size.
Definition: query_sql_fields.h:151
void WriteBool(bool val)
Write bool.
Definition: portable_raw_writer.cpp:34
~SqlFieldsQuery()
Destructor.
Definition: query_sql_fields.h:94
SqlFieldsQuery(const std::string &sql)
Constructor.
Definition: query_sql_fields.h:42
Declares gridgain::portable::PortableRawWriter class.
const std::string & GetSql() const
Get SQL string.
Definition: query_sql_fields.h:121
Portable raw writer.
Definition: portable_raw_writer.h:34
bool IsLocal() const
Get local flag.
Definition: query_sql_fields.h:161
GridGain API.
Definition: cache.h:35