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 
583  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_):
584  tableName( tableName_ ),
585  columnNames( columnNames_ ),
586  offset( offset_ ),
587  limit( limit_ ),
588  encoding( "binary" ),
589  options( options_ )
590  {
591  }
592 
1092  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_):
1093  tableName( tableName_ ),
1094  columnNames( columnNames_ ),
1095  offset( offset_ ),
1096  limit( limit_ ),
1097  encoding( encoding_ ),
1098  options( options_ )
1099  {
1100  }
1101 
1108  std::string tableName;
1109 
1114  std::vector<std::string> columnNames;
1115 
1122  int64_t offset;
1123 
1137  int64_t limit;
1138 
1153  std::string encoding;
1154 
1469  std::map<std::string, std::string> options;
1470  };
1471 } // end namespace gpudb
1472 
1473 namespace avro
1474 {
1475  template<> struct codec_traits<gpudb::AggregateGroupByRequest>
1476  {
1477  static void encode(Encoder& e, const gpudb::AggregateGroupByRequest& v)
1478  {
1479  ::avro::encode(e, v.tableName);
1480  ::avro::encode(e, v.columnNames);
1481  ::avro::encode(e, v.offset);
1482  ::avro::encode(e, v.limit);
1483  ::avro::encode(e, v.encoding);
1484  ::avro::encode(e, v.options);
1485  }
1486 
1487  static void decode(Decoder& d, gpudb::AggregateGroupByRequest& v)
1488  {
1489  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1490  {
1491  const std::vector<size_t> fo = rd->fieldOrder();
1492 
1493  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1494  {
1495  switch (*it)
1496  {
1497  case 0:
1498  ::avro::decode(d, v.tableName);
1499  break;
1500 
1501  case 1:
1502  ::avro::decode(d, v.columnNames);
1503  break;
1504 
1505  case 2:
1506  ::avro::decode(d, v.offset);
1507  break;
1508 
1509  case 3:
1510  ::avro::decode(d, v.limit);
1511  break;
1512 
1513  case 4:
1514  ::avro::decode(d, v.encoding);
1515  break;
1516 
1517  case 5:
1518  ::avro::decode(d, v.options);
1519  break;
1520 
1521  default:
1522  break;
1523  }
1524  }
1525  }
1526  else
1527  {
1528  ::avro::decode(d, v.tableName);
1529  ::avro::decode(d, v.columnNames);
1530  ::avro::decode(d, v.offset);
1531  ::avro::decode(d, v.limit);
1532  ::avro::decode(d, v.encoding);
1533  ::avro::decode(d, v.options);
1534  }
1535  }
1536  };
1537 } // end namespace avro
1538 
1539 namespace gpudb
1540 {
1547  {
1553  responseSchemaStr(std::string()),
1554  binaryEncodedResponse(std::vector<uint8_t>()),
1555  jsonEncodedResponse(std::string()),
1556  totalNumberOfRecords(int64_t()),
1557  hasMoreRecords(bool()),
1558  info(std::map<std::string, std::string>())
1559  {
1560  }
1561 
1566  std::string responseSchemaStr;
1567 
1571  std::vector<uint8_t> binaryEncodedResponse;
1572 
1576  std::string jsonEncodedResponse;
1577 
1584 
1589 
1600  std::map<std::string, std::string> info;
1601  };
1602 } // end namespace gpudb
1603 
1604 namespace avro
1605 {
1606  template<> struct codec_traits<gpudb::RawAggregateGroupByResponse>
1607  {
1608  static void encode(Encoder& e, const gpudb::RawAggregateGroupByResponse& v)
1609  {
1610  ::avro::encode(e, v.responseSchemaStr);
1611  ::avro::encode(e, v.binaryEncodedResponse);
1612  ::avro::encode(e, v.jsonEncodedResponse);
1613  ::avro::encode(e, v.totalNumberOfRecords);
1614  ::avro::encode(e, v.hasMoreRecords);
1615  ::avro::encode(e, v.info);
1616  }
1617 
1618  static void decode(Decoder& d, gpudb::RawAggregateGroupByResponse& v)
1619  {
1620  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1621  {
1622  const std::vector<size_t> fo = rd->fieldOrder();
1623 
1624  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1625  {
1626  switch (*it)
1627  {
1628  case 0:
1629  ::avro::decode(d, v.responseSchemaStr);
1630  break;
1631 
1632  case 1:
1633  ::avro::decode(d, v.binaryEncodedResponse);
1634  break;
1635 
1636  case 2:
1637  ::avro::decode(d, v.jsonEncodedResponse);
1638  break;
1639 
1640  case 3:
1641  ::avro::decode(d, v.totalNumberOfRecords);
1642  break;
1643 
1644  case 4:
1645  ::avro::decode(d, v.hasMoreRecords);
1646  break;
1647 
1648  case 5:
1649  ::avro::decode(d, v.info);
1650  break;
1651 
1652  default:
1653  break;
1654  }
1655  }
1656  }
1657  else
1658  {
1659  ::avro::decode(d, v.responseSchemaStr);
1660  ::avro::decode(d, v.binaryEncodedResponse);
1661  ::avro::decode(d, v.jsonEncodedResponse);
1662  ::avro::decode(d, v.totalNumberOfRecords);
1663  ::avro::decode(d, v.hasMoreRecords);
1664  ::avro::decode(d, v.info);
1665  }
1666  }
1667  };
1668 } // end namespace avro
1669 
1670 namespace gpudb
1671 {
1678  {
1684  responseSchemaStr(std::string()),
1685  data(std::vector<gpudb::GenericRecord>()),
1686  totalNumberOfRecords(int64_t()),
1687  hasMoreRecords(bool()),
1688  info(std::map<std::string, std::string>()),
1689  dataTypePtr((gpudb::Type*)NULL)
1690  {
1691  }
1692 
1696  std::string responseSchemaStr;
1697 
1701  std::vector<gpudb::GenericRecord> data;
1702 
1709 
1714 
1725  std::map<std::string, std::string> info;
1726 
1728  };
1729 } // end namespace gpudb
1730 
1731 #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.