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 {
87  {
93  tableName(std::string()),
94  columnNames(std::vector<std::string>()),
95  offset(int64_t()),
96  limit(int64_t()),
97  encoding(std::string("binary")),
98  options(std::map<std::string, std::string>())
99  {
100  }
101 
486  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_):
487  tableName( tableName_ ),
488  columnNames( columnNames_ ),
489  offset( offset_ ),
490  limit( limit_ ),
491  encoding( "binary" ),
492  options( options_ )
493  {
494  }
495 
895  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_):
896  tableName( tableName_ ),
897  columnNames( columnNames_ ),
898  offset( offset_ ),
899  limit( limit_ ),
900  encoding( encoding_ ),
901  options( options_ )
902  {
903  }
904 
911  std::string tableName;
912 
917  std::vector<std::string> columnNames;
918 
925  int64_t offset;
926 
940  int64_t limit;
941 
956  std::string encoding;
957 
1206  std::map<std::string, std::string> options;
1207  };
1208 } // end namespace gpudb
1209 
1210 namespace avro
1211 {
1212  template<> struct codec_traits<gpudb::AggregateGroupByRequest>
1213  {
1214  static void encode(Encoder& e, const gpudb::AggregateGroupByRequest& v)
1215  {
1216  ::avro::encode(e, v.tableName);
1217  ::avro::encode(e, v.columnNames);
1218  ::avro::encode(e, v.offset);
1219  ::avro::encode(e, v.limit);
1220  ::avro::encode(e, v.encoding);
1221  ::avro::encode(e, v.options);
1222  }
1223 
1224  static void decode(Decoder& d, gpudb::AggregateGroupByRequest& v)
1225  {
1226  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1227  {
1228  const std::vector<size_t> fo = rd->fieldOrder();
1229 
1230  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1231  {
1232  switch (*it)
1233  {
1234  case 0:
1235  ::avro::decode(d, v.tableName);
1236  break;
1237 
1238  case 1:
1239  ::avro::decode(d, v.columnNames);
1240  break;
1241 
1242  case 2:
1243  ::avro::decode(d, v.offset);
1244  break;
1245 
1246  case 3:
1247  ::avro::decode(d, v.limit);
1248  break;
1249 
1250  case 4:
1251  ::avro::decode(d, v.encoding);
1252  break;
1253 
1254  case 5:
1255  ::avro::decode(d, v.options);
1256  break;
1257 
1258  default:
1259  break;
1260  }
1261  }
1262  }
1263  else
1264  {
1265  ::avro::decode(d, v.tableName);
1266  ::avro::decode(d, v.columnNames);
1267  ::avro::decode(d, v.offset);
1268  ::avro::decode(d, v.limit);
1269  ::avro::decode(d, v.encoding);
1270  ::avro::decode(d, v.options);
1271  }
1272  }
1273  };
1274 } // end namespace avro
1275 
1276 namespace gpudb
1277 {
1284  {
1290  responseSchemaStr(std::string()),
1291  binaryEncodedResponse(std::vector<uint8_t>()),
1292  jsonEncodedResponse(std::string()),
1293  totalNumberOfRecords(int64_t()),
1294  hasMoreRecords(bool()),
1295  info(std::map<std::string, std::string>())
1296  {
1297  }
1298 
1303  std::string responseSchemaStr;
1304 
1308  std::vector<uint8_t> binaryEncodedResponse;
1309 
1313  std::string jsonEncodedResponse;
1314 
1321 
1326 
1337  std::map<std::string, std::string> info;
1338  };
1339 } // end namespace gpudb
1340 
1341 namespace avro
1342 {
1343  template<> struct codec_traits<gpudb::RawAggregateGroupByResponse>
1344  {
1345  static void encode(Encoder& e, const gpudb::RawAggregateGroupByResponse& v)
1346  {
1347  ::avro::encode(e, v.responseSchemaStr);
1348  ::avro::encode(e, v.binaryEncodedResponse);
1349  ::avro::encode(e, v.jsonEncodedResponse);
1350  ::avro::encode(e, v.totalNumberOfRecords);
1351  ::avro::encode(e, v.hasMoreRecords);
1352  ::avro::encode(e, v.info);
1353  }
1354 
1355  static void decode(Decoder& d, gpudb::RawAggregateGroupByResponse& v)
1356  {
1357  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1358  {
1359  const std::vector<size_t> fo = rd->fieldOrder();
1360 
1361  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1362  {
1363  switch (*it)
1364  {
1365  case 0:
1366  ::avro::decode(d, v.responseSchemaStr);
1367  break;
1368 
1369  case 1:
1370  ::avro::decode(d, v.binaryEncodedResponse);
1371  break;
1372 
1373  case 2:
1374  ::avro::decode(d, v.jsonEncodedResponse);
1375  break;
1376 
1377  case 3:
1378  ::avro::decode(d, v.totalNumberOfRecords);
1379  break;
1380 
1381  case 4:
1382  ::avro::decode(d, v.hasMoreRecords);
1383  break;
1384 
1385  case 5:
1386  ::avro::decode(d, v.info);
1387  break;
1388 
1389  default:
1390  break;
1391  }
1392  }
1393  }
1394  else
1395  {
1396  ::avro::decode(d, v.responseSchemaStr);
1397  ::avro::decode(d, v.binaryEncodedResponse);
1398  ::avro::decode(d, v.jsonEncodedResponse);
1399  ::avro::decode(d, v.totalNumberOfRecords);
1400  ::avro::decode(d, v.hasMoreRecords);
1401  ::avro::decode(d, v.info);
1402  }
1403  }
1404  };
1405 } // end namespace avro
1406 
1407 namespace gpudb
1408 {
1415  {
1421  responseSchemaStr(std::string()),
1422  data(std::vector<gpudb::GenericRecord>()),
1423  totalNumberOfRecords(int64_t()),
1424  hasMoreRecords(bool()),
1425  info(std::map<std::string, std::string>()),
1426  dataTypePtr((gpudb::Type*)NULL)
1427  {
1428  }
1429 
1433  std::string responseSchemaStr;
1434 
1438  std::vector<gpudb::GenericRecord> data;
1439 
1446 
1451 
1462  std::map<std::string, std::string> info;
1463 
1465  };
1466 } // end namespace gpudb
1467 
1468 #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.