6 #ifndef __EXECUTE_SQL_H__ 7 #define __EXECUTE_SQL_H__ 9 #include "../GenericRecord.hpp" 33 data(std::vector<std::vector<uint8_t> >()),
34 options(std::map<std::string, std::string>())
405 ExecuteSqlRequest(
const std::string& statement_,
const int64_t offset_,
const int64_t limit_,
const std::string& requestSchemaStr_,
const std::vector<std::vector<uint8_t> >& data_,
const std::map<std::string, std::string>& options_):
795 ExecuteSqlRequest(
const std::string& statement_,
const int64_t offset_,
const int64_t limit_,
const std::string& encoding_,
const std::string& requestSchemaStr_,
const std::vector<std::vector<uint8_t> >& data_,
const std::map<std::string, std::string>& options_):
857 std::vector<std::vector<uint8_t> >
data;
1095 template<>
struct codec_traits<
gpudb::ExecuteSqlRequest>
1100 ::avro::encode(e, v.
offset);
1101 ::avro::encode(e, v.
limit);
1104 ::avro::encode(e, v.
data);
1110 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1112 const std::vector<size_t> fo = rd->fieldOrder();
1114 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1123 ::avro::decode(d, v.
offset);
1127 ::avro::decode(d, v.
limit);
1139 ::avro::decode(d, v.
data);
1154 ::avro::decode(d, v.
offset);
1155 ::avro::decode(d, v.
limit);
1158 ::avro::decode(d, v.
data);
1185 info(std::map<std::string, std::string>())
1239 std::map<std::string, std::string>
info;
1245 template<>
struct codec_traits<
gpudb::RawExecuteSqlResponse>
1256 ::avro::encode(e, v.
info);
1261 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1263 const std::vector<size_t> fo = rd->fieldOrder();
1265 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1298 ::avro::decode(d, v.
info);
1315 ::avro::decode(d, v.
info);
1339 info(std::map<std::string, std::string>()),
1357 std::vector<gpudb::GenericRecord>
data;
1388 std::map<std::string, std::string>
info;
1394 #endif // __EXECUTE_SQL_H__ gpudb_type_ptr_t dataTypePtr
ExecuteSqlRequest()
Constructs an ExecuteSqlRequest object with default parameters.
ExecuteSqlRequest(const std::string &statement_, const int64_t offset_, const int64_t limit_, const std::string &requestSchemaStr_, const std::vector< std::vector< uint8_t > > &data_, const std::map< std::string, std::string > &options_)
Constructs an ExecuteSqlRequest object with the specified parameters.
boost::shared_ptr< Type > gpudb_type_ptr_t
std::map< std::string, std::string > options
Optional parameters.
std::string pagingTable
Name of the table that has the result records of the query.
std::string encoding
Specifies the encoding for returned records; either 'binary' or 'json'.
int64_t countAffected
The number of objects/records affected.
std::string statement
SQL statement (query, DML, or DDL) to be executed.
std::vector< gpudb::GenericRecord > data
Avro binary encoded response.
std::string requestSchemaStr
Avro schema of data.
bool hasMoreRecords
Too many records.
int64_t totalNumberOfRecords
Total/Filtered number of records.
int64_t countAffected
The number of objects/records affected.
ExecuteSqlResponse()
Constructs an ExecuteSqlResponse object with default parameters.
std::string jsonEncodedResponse
Avro JSON encoded response.
int64_t offset
A positive integer indicating the number of initial results to skip (this can be useful for paging th...
std::vector< std::vector< uint8_t > > data
An array of binary-encoded data for the records to be binded to the SQL query.
A set of results returned by GPUdb::executeSql.
int64_t totalNumberOfRecords
Total/Filtered number of records.
A set of results returned by GPUdb::executeSqlRaw.
std::string responseSchemaStr
Avro schema of binaryEncodedResponse or jsonEncodedResponse.
bool hasMoreRecords
Too many records.
A set of parameters for GPUdb::executeSql.
std::map< std::string, std::string > info
Additional information.
int64_t limit
A positive integer indicating the maximum number of results to be returned, or END_OF_SET (-9999) to ...
ExecuteSqlRequest(const std::string &statement_, const int64_t offset_, const int64_t limit_, const std::string &encoding_, const std::string &requestSchemaStr_, const std::vector< std::vector< uint8_t > > &data_, const std::map< std::string, std::string > &options_)
Constructs an ExecuteSqlRequest object with the specified parameters.
std::map< std::string, std::string > info
Additional information.
std::string pagingTable
Name of the table that has the result records of the query.
RawExecuteSqlResponse()
Constructs a RawExecuteSqlResponse object with default parameters.
std::string responseSchemaStr
Avro schema of data or jsonEncodedResponse.
std::vector< uint8_t > binaryEncodedResponse
Avro binary encoded response.