GPUdb C++ API  Version 7.2.2.4
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 
458  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_):
459  tableName( tableName_ ),
460  columnNames( columnNames_ ),
461  offset( offset_ ),
462  limit( limit_ ),
463  encoding( "binary" ),
464  options( options_ )
465  {
466  }
467 
839  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_):
840  tableName( tableName_ ),
841  columnNames( columnNames_ ),
842  offset( offset_ ),
843  limit( limit_ ),
844  encoding( encoding_ ),
845  options( options_ )
846  {
847  }
848 
855  std::string tableName;
856 
861  std::vector<std::string> columnNames;
862 
869  int64_t offset;
870 
884  int64_t limit;
885 
900  std::string encoding;
901 
1127  std::map<std::string, std::string> options;
1128  };
1129 } // end namespace gpudb
1130 
1131 namespace avro
1132 {
1133  template<> struct codec_traits<gpudb::AggregateGroupByRequest>
1134  {
1135  static void encode(Encoder& e, const gpudb::AggregateGroupByRequest& v)
1136  {
1137  ::avro::encode(e, v.tableName);
1138  ::avro::encode(e, v.columnNames);
1139  ::avro::encode(e, v.offset);
1140  ::avro::encode(e, v.limit);
1141  ::avro::encode(e, v.encoding);
1142  ::avro::encode(e, v.options);
1143  }
1144 
1145  static void decode(Decoder& d, gpudb::AggregateGroupByRequest& v)
1146  {
1147  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1148  {
1149  const std::vector<size_t> fo = rd->fieldOrder();
1150 
1151  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1152  {
1153  switch (*it)
1154  {
1155  case 0:
1156  ::avro::decode(d, v.tableName);
1157  break;
1158 
1159  case 1:
1160  ::avro::decode(d, v.columnNames);
1161  break;
1162 
1163  case 2:
1164  ::avro::decode(d, v.offset);
1165  break;
1166 
1167  case 3:
1168  ::avro::decode(d, v.limit);
1169  break;
1170 
1171  case 4:
1172  ::avro::decode(d, v.encoding);
1173  break;
1174 
1175  case 5:
1176  ::avro::decode(d, v.options);
1177  break;
1178 
1179  default:
1180  break;
1181  }
1182  }
1183  }
1184  else
1185  {
1186  ::avro::decode(d, v.tableName);
1187  ::avro::decode(d, v.columnNames);
1188  ::avro::decode(d, v.offset);
1189  ::avro::decode(d, v.limit);
1190  ::avro::decode(d, v.encoding);
1191  ::avro::decode(d, v.options);
1192  }
1193  }
1194  };
1195 } // end namespace avro
1196 
1197 namespace gpudb
1198 {
1205  {
1211  responseSchemaStr(std::string()),
1212  binaryEncodedResponse(std::vector<uint8_t>()),
1213  jsonEncodedResponse(std::string()),
1214  totalNumberOfRecords(int64_t()),
1215  hasMoreRecords(bool()),
1216  info(std::map<std::string, std::string>())
1217  {
1218  }
1219 
1224  std::string responseSchemaStr;
1225 
1229  std::vector<uint8_t> binaryEncodedResponse;
1230 
1234  std::string jsonEncodedResponse;
1235 
1242 
1247 
1258  std::map<std::string, std::string> info;
1259  };
1260 } // end namespace gpudb
1261 
1262 namespace avro
1263 {
1264  template<> struct codec_traits<gpudb::RawAggregateGroupByResponse>
1265  {
1266  static void encode(Encoder& e, const gpudb::RawAggregateGroupByResponse& v)
1267  {
1268  ::avro::encode(e, v.responseSchemaStr);
1269  ::avro::encode(e, v.binaryEncodedResponse);
1270  ::avro::encode(e, v.jsonEncodedResponse);
1271  ::avro::encode(e, v.totalNumberOfRecords);
1272  ::avro::encode(e, v.hasMoreRecords);
1273  ::avro::encode(e, v.info);
1274  }
1275 
1276  static void decode(Decoder& d, gpudb::RawAggregateGroupByResponse& v)
1277  {
1278  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1279  {
1280  const std::vector<size_t> fo = rd->fieldOrder();
1281 
1282  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1283  {
1284  switch (*it)
1285  {
1286  case 0:
1287  ::avro::decode(d, v.responseSchemaStr);
1288  break;
1289 
1290  case 1:
1291  ::avro::decode(d, v.binaryEncodedResponse);
1292  break;
1293 
1294  case 2:
1295  ::avro::decode(d, v.jsonEncodedResponse);
1296  break;
1297 
1298  case 3:
1299  ::avro::decode(d, v.totalNumberOfRecords);
1300  break;
1301 
1302  case 4:
1303  ::avro::decode(d, v.hasMoreRecords);
1304  break;
1305 
1306  case 5:
1307  ::avro::decode(d, v.info);
1308  break;
1309 
1310  default:
1311  break;
1312  }
1313  }
1314  }
1315  else
1316  {
1317  ::avro::decode(d, v.responseSchemaStr);
1318  ::avro::decode(d, v.binaryEncodedResponse);
1319  ::avro::decode(d, v.jsonEncodedResponse);
1320  ::avro::decode(d, v.totalNumberOfRecords);
1321  ::avro::decode(d, v.hasMoreRecords);
1322  ::avro::decode(d, v.info);
1323  }
1324  }
1325  };
1326 } // end namespace avro
1327 
1328 namespace gpudb
1329 {
1336  {
1342  responseSchemaStr(std::string()),
1343  data(std::vector<gpudb::GenericRecord>()),
1344  totalNumberOfRecords(int64_t()),
1345  hasMoreRecords(bool()),
1346  info(std::map<std::string, std::string>()),
1347  dataTypePtr((gpudb::Type*)NULL)
1348  {
1349  }
1350 
1354  std::string responseSchemaStr;
1355 
1359  std::vector<gpudb::GenericRecord> data;
1360 
1367 
1372 
1383  std::map<std::string, std::string> info;
1384 
1386  };
1387 } // end namespace gpudb
1388 
1389 #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.