GPUdb C++ API  Version 7.2.3.0
aggregate_group_by.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __AGGREGATE_GROUP_BY_H__
7 #define __AGGREGATE_GROUP_BY_H__
8 
9 #include "../GenericRecord.hpp"
10 
11 namespace gpudb
12 {
84  {
90  tableName(std::string()),
91  columnNames(std::vector<std::string>()),
92  offset(int64_t()),
93  limit(int64_t()),
94  encoding(std::string("binary")),
95  options(std::map<std::string, std::string>())
96  {
97  }
98 
483  AggregateGroupByRequest(const std::string& tableName_, const std::vector<std::string>& columnNames_, const int64_t offset_, const int64_t limit_, const std::map<std::string, std::string>& options_):
484  tableName( tableName_ ),
485  columnNames( columnNames_ ),
486  offset( offset_ ),
487  limit( limit_ ),
488  encoding( "binary" ),
489  options( options_ )
490  {
491  }
492 
892  AggregateGroupByRequest(const std::string& tableName_, const std::vector<std::string>& columnNames_, const int64_t offset_, const int64_t limit_, const std::string& encoding_, const std::map<std::string, std::string>& options_):
893  tableName( tableName_ ),
894  columnNames( columnNames_ ),
895  offset( offset_ ),
896  limit( limit_ ),
897  encoding( encoding_ ),
898  options( options_ )
899  {
900  }
901 
908  std::string tableName;
909 
914  std::vector<std::string> columnNames;
915 
922  int64_t offset;
923 
937  int64_t limit;
938 
953  std::string encoding;
954 
1203  std::map<std::string, std::string> options;
1204  };
1205 } // end namespace gpudb
1206 
1207 namespace avro
1208 {
1209  template<> struct codec_traits<gpudb::AggregateGroupByRequest>
1210  {
1211  static void encode(Encoder& e, const gpudb::AggregateGroupByRequest& v)
1212  {
1213  ::avro::encode(e, v.tableName);
1214  ::avro::encode(e, v.columnNames);
1215  ::avro::encode(e, v.offset);
1216  ::avro::encode(e, v.limit);
1217  ::avro::encode(e, v.encoding);
1218  ::avro::encode(e, v.options);
1219  }
1220 
1221  static void decode(Decoder& d, gpudb::AggregateGroupByRequest& v)
1222  {
1223  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1224  {
1225  const std::vector<size_t> fo = rd->fieldOrder();
1226 
1227  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1228  {
1229  switch (*it)
1230  {
1231  case 0:
1232  ::avro::decode(d, v.tableName);
1233  break;
1234 
1235  case 1:
1236  ::avro::decode(d, v.columnNames);
1237  break;
1238 
1239  case 2:
1240  ::avro::decode(d, v.offset);
1241  break;
1242 
1243  case 3:
1244  ::avro::decode(d, v.limit);
1245  break;
1246 
1247  case 4:
1248  ::avro::decode(d, v.encoding);
1249  break;
1250 
1251  case 5:
1252  ::avro::decode(d, v.options);
1253  break;
1254 
1255  default:
1256  break;
1257  }
1258  }
1259  }
1260  else
1261  {
1262  ::avro::decode(d, v.tableName);
1263  ::avro::decode(d, v.columnNames);
1264  ::avro::decode(d, v.offset);
1265  ::avro::decode(d, v.limit);
1266  ::avro::decode(d, v.encoding);
1267  ::avro::decode(d, v.options);
1268  }
1269  }
1270  };
1271 } // end namespace avro
1272 
1273 namespace gpudb
1274 {
1281  {
1287  responseSchemaStr(std::string()),
1288  binaryEncodedResponse(std::vector<uint8_t>()),
1289  jsonEncodedResponse(std::string()),
1290  totalNumberOfRecords(int64_t()),
1291  hasMoreRecords(bool()),
1292  info(std::map<std::string, std::string>())
1293  {
1294  }
1295 
1300  std::string responseSchemaStr;
1301 
1305  std::vector<uint8_t> binaryEncodedResponse;
1306 
1310  std::string jsonEncodedResponse;
1311 
1318 
1323 
1334  std::map<std::string, std::string> info;
1335  };
1336 } // end namespace gpudb
1337 
1338 namespace avro
1339 {
1340  template<> struct codec_traits<gpudb::RawAggregateGroupByResponse>
1341  {
1342  static void encode(Encoder& e, const gpudb::RawAggregateGroupByResponse& v)
1343  {
1344  ::avro::encode(e, v.responseSchemaStr);
1345  ::avro::encode(e, v.binaryEncodedResponse);
1346  ::avro::encode(e, v.jsonEncodedResponse);
1347  ::avro::encode(e, v.totalNumberOfRecords);
1348  ::avro::encode(e, v.hasMoreRecords);
1349  ::avro::encode(e, v.info);
1350  }
1351 
1352  static void decode(Decoder& d, gpudb::RawAggregateGroupByResponse& v)
1353  {
1354  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1355  {
1356  const std::vector<size_t> fo = rd->fieldOrder();
1357 
1358  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1359  {
1360  switch (*it)
1361  {
1362  case 0:
1363  ::avro::decode(d, v.responseSchemaStr);
1364  break;
1365 
1366  case 1:
1367  ::avro::decode(d, v.binaryEncodedResponse);
1368  break;
1369 
1370  case 2:
1371  ::avro::decode(d, v.jsonEncodedResponse);
1372  break;
1373 
1374  case 3:
1375  ::avro::decode(d, v.totalNumberOfRecords);
1376  break;
1377 
1378  case 4:
1379  ::avro::decode(d, v.hasMoreRecords);
1380  break;
1381 
1382  case 5:
1383  ::avro::decode(d, v.info);
1384  break;
1385 
1386  default:
1387  break;
1388  }
1389  }
1390  }
1391  else
1392  {
1393  ::avro::decode(d, v.responseSchemaStr);
1394  ::avro::decode(d, v.binaryEncodedResponse);
1395  ::avro::decode(d, v.jsonEncodedResponse);
1396  ::avro::decode(d, v.totalNumberOfRecords);
1397  ::avro::decode(d, v.hasMoreRecords);
1398  ::avro::decode(d, v.info);
1399  }
1400  }
1401  };
1402 } // end namespace avro
1403 
1404 namespace gpudb
1405 {
1412  {
1418  responseSchemaStr(std::string()),
1419  data(std::vector<gpudb::GenericRecord>()),
1420  totalNumberOfRecords(int64_t()),
1421  hasMoreRecords(bool()),
1422  info(std::map<std::string, std::string>()),
1423  dataTypePtr((gpudb::Type*)NULL)
1424  {
1425  }
1426 
1430  std::string responseSchemaStr;
1431 
1435  std::vector<gpudb::GenericRecord> data;
1436 
1443 
1448 
1459  std::map<std::string, std::string> info;
1460 
1462  };
1463 } // end namespace gpudb
1464 
1465 #endif // __AGGREGATE_GROUP_BY_H__
A set of results returned by GPUdb::aggregateGroupByRaw.
AggregateGroupByRequest(const std::string &tableName_, const std::vector< std::string > &columnNames_, const int64_t offset_, const int64_t limit_, const std::map< std::string, std::string > &options_)
Constructs an AggregateGroupByRequest object with the specified parameters.
boost::shared_ptr< Type > gpudb_type_ptr_t
int64_t limit
A positive integer indicating the maximum number of results to be returned, or END_OF_SET (-9999) to ...
int64_t totalNumberOfRecords
Total/Filtered number of records.
bool hasMoreRecords
Too many records.
A set of parameters for GPUdb::aggregateGroupBy.
std::string tableName
Name of an existing table or view on which the operation will be performed, in [ schema_name....
AggregateGroupByResponse()
Constructs an AggregateGroupByResponse object with default parameters.
std::vector< std::string > columnNames
List of one or more column names, expressions, and aggregate expressions.
AggregateGroupByRequest(const std::string &tableName_, const std::vector< std::string > &columnNames_, const int64_t offset_, const int64_t limit_, const std::string &encoding_, const std::map< std::string, std::string > &options_)
Constructs an AggregateGroupByRequest object with the specified parameters.
std::string encoding
Specifies the encoding for returned records.
int64_t totalNumberOfRecords
Total/Filtered number of records.
std::string jsonEncodedResponse
Avro JSON encoded response.
std::vector< uint8_t > binaryEncodedResponse
Avro binary encoded response.
std::map< std::string, std::string > info
Additional information.
AggregateGroupByRequest()
Constructs an AggregateGroupByRequest object with default parameters.
A set of results returned by GPUdb::aggregateGroupBy.
std::string responseSchemaStr
Avro schema of binaryEncodedResponse or jsonEncodedResponse.
RawAggregateGroupByResponse()
Constructs a RawAggregateGroupByResponse object with default parameters.
int64_t offset
A positive integer indicating the number of initial results to skip (this can be useful for paging th...
std::map< std::string, std::string > info
Additional information.
std::map< std::string, std::string > options
Optional parameters.
std::vector< gpudb::GenericRecord > data
Avro binary encoded response.
std::string responseSchemaStr
Avro schema of data or jsonEncodedResponse.