GPUdb C++ API  Version 7.2.3.0
aggregate_unique.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_UNIQUE_H__
7 #define __AGGREGATE_UNIQUE_H__
8 
9 #include "../GenericRecord.hpp"
10 
11 namespace gpudb
12 {
57  {
62  tableName(std::string()),
63  columnName(std::string()),
64  offset(int64_t()),
65  limit(int64_t()),
66  encoding(std::string("binary")),
67  options(std::map<std::string, std::string>())
68  {
69  }
70 
308  AggregateUniqueRequest(const std::string& tableName_, const std::string& columnName_, const int64_t offset_, const int64_t limit_, const std::map<std::string, std::string>& options_):
309  tableName( tableName_ ),
310  columnName( columnName_ ),
311  offset( offset_ ),
312  limit( limit_ ),
313  encoding( "binary" ),
314  options( options_ )
315  {
316  }
317 
570  AggregateUniqueRequest(const std::string& tableName_, const std::string& columnName_, const int64_t offset_, const int64_t limit_, const std::string& encoding_, const std::map<std::string, std::string>& options_):
571  tableName( tableName_ ),
572  columnName( columnName_ ),
573  offset( offset_ ),
574  limit( limit_ ),
575  encoding( encoding_ ),
576  options( options_ )
577  {
578  }
579 
586  std::string tableName;
587 
592  std::string columnName;
593 
600  int64_t offset;
601 
615  int64_t limit;
616 
630  std::string encoding;
631 
775  std::map<std::string, std::string> options;
776  };
777 } // end namespace gpudb
778 
779 namespace avro
780 {
781  template<> struct codec_traits<gpudb::AggregateUniqueRequest>
782  {
783  static void encode(Encoder& e, const gpudb::AggregateUniqueRequest& v)
784  {
785  ::avro::encode(e, v.tableName);
786  ::avro::encode(e, v.columnName);
787  ::avro::encode(e, v.offset);
788  ::avro::encode(e, v.limit);
789  ::avro::encode(e, v.encoding);
790  ::avro::encode(e, v.options);
791  }
792 
793  static void decode(Decoder& d, gpudb::AggregateUniqueRequest& v)
794  {
795  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
796  {
797  const std::vector<size_t> fo = rd->fieldOrder();
798 
799  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
800  {
801  switch (*it)
802  {
803  case 0:
804  ::avro::decode(d, v.tableName);
805  break;
806 
807  case 1:
808  ::avro::decode(d, v.columnName);
809  break;
810 
811  case 2:
812  ::avro::decode(d, v.offset);
813  break;
814 
815  case 3:
816  ::avro::decode(d, v.limit);
817  break;
818 
819  case 4:
820  ::avro::decode(d, v.encoding);
821  break;
822 
823  case 5:
824  ::avro::decode(d, v.options);
825  break;
826 
827  default:
828  break;
829  }
830  }
831  }
832  else
833  {
834  ::avro::decode(d, v.tableName);
835  ::avro::decode(d, v.columnName);
836  ::avro::decode(d, v.offset);
837  ::avro::decode(d, v.limit);
838  ::avro::decode(d, v.encoding);
839  ::avro::decode(d, v.options);
840  }
841  }
842  };
843 } // end namespace avro
844 
845 namespace gpudb
846 {
853  {
859  tableName(std::string()),
860  responseSchemaStr(std::string()),
861  binaryEncodedResponse(std::vector<uint8_t>()),
862  jsonEncodedResponse(std::string()),
863  hasMoreRecords(bool()),
864  info(std::map<std::string, std::string>())
865  {
866  }
867 
871  std::string tableName;
872 
877  std::string responseSchemaStr;
878 
882  std::vector<uint8_t> binaryEncodedResponse;
883 
887  std::string jsonEncodedResponse;
888 
893 
904  std::map<std::string, std::string> info;
905  };
906 } // end namespace gpudb
907 
908 namespace avro
909 {
910  template<> struct codec_traits<gpudb::RawAggregateUniqueResponse>
911  {
912  static void encode(Encoder& e, const gpudb::RawAggregateUniqueResponse& v)
913  {
914  ::avro::encode(e, v.tableName);
915  ::avro::encode(e, v.responseSchemaStr);
916  ::avro::encode(e, v.binaryEncodedResponse);
917  ::avro::encode(e, v.jsonEncodedResponse);
918  ::avro::encode(e, v.hasMoreRecords);
919  ::avro::encode(e, v.info);
920  }
921 
922  static void decode(Decoder& d, gpudb::RawAggregateUniqueResponse& v)
923  {
924  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
925  {
926  const std::vector<size_t> fo = rd->fieldOrder();
927 
928  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
929  {
930  switch (*it)
931  {
932  case 0:
933  ::avro::decode(d, v.tableName);
934  break;
935 
936  case 1:
937  ::avro::decode(d, v.responseSchemaStr);
938  break;
939 
940  case 2:
941  ::avro::decode(d, v.binaryEncodedResponse);
942  break;
943 
944  case 3:
945  ::avro::decode(d, v.jsonEncodedResponse);
946  break;
947 
948  case 4:
949  ::avro::decode(d, v.hasMoreRecords);
950  break;
951 
952  case 5:
953  ::avro::decode(d, v.info);
954  break;
955 
956  default:
957  break;
958  }
959  }
960  }
961  else
962  {
963  ::avro::decode(d, v.tableName);
964  ::avro::decode(d, v.responseSchemaStr);
965  ::avro::decode(d, v.binaryEncodedResponse);
966  ::avro::decode(d, v.jsonEncodedResponse);
967  ::avro::decode(d, v.hasMoreRecords);
968  ::avro::decode(d, v.info);
969  }
970  }
971  };
972 } // end namespace avro
973 
974 namespace gpudb
975 {
982  {
988  tableName(std::string()),
989  responseSchemaStr(std::string()),
990  data(std::vector<gpudb::GenericRecord>()),
991  hasMoreRecords(bool()),
992  info(std::map<std::string, std::string>()),
993  dataTypePtr((gpudb::Type*)NULL)
994  {
995  }
996 
1000  std::string tableName;
1001 
1005  std::string responseSchemaStr;
1006 
1010  std::vector<gpudb::GenericRecord> data;
1011 
1016 
1027  std::map<std::string, std::string> info;
1028 
1030  };
1031 } // end namespace gpudb
1032 
1033 #endif // __AGGREGATE_UNIQUE_H__
std::string responseSchemaStr
Avro schema of data or jsonEncodedResponse.
AggregateUniqueRequest()
Constructs an AggregateUniqueRequest object with default parameters.
boost::shared_ptr< Type > gpudb_type_ptr_t
std::vector< gpudb::GenericRecord > data
Avro binary encoded response.
std::string responseSchemaStr
Avro schema of binaryEncodedResponse or jsonEncodedResponse.
std::map< std::string, std::string > info
Additional information.
bool hasMoreRecords
Too many records.
std::string tableName
Name of an existing table or view on which the operation will be performed, in [ schema_name....
std::string encoding
Specifies the encoding for returned records.
std::string tableName
The same table name as was passed in the parameter list.
A set of parameters for GPUdb::aggregateUnique.
std::string tableName
The same table name as was passed in the parameter list.
std::string columnName
Name of the column or an expression containing one or more column names on which the unique function ...
int64_t offset
A positive integer indicating the number of initial results to skip (this can be useful for paging th...
A set of results returned by GPUdb::aggregateUnique.
AggregateUniqueResponse()
Constructs an AggregateUniqueResponse object with default parameters.
std::string jsonEncodedResponse
Avro JSON encoded response.
RawAggregateUniqueResponse()
Constructs a RawAggregateUniqueResponse object with default parameters.
bool hasMoreRecords
Too many records.
AggregateUniqueRequest(const std::string &tableName_, const std::string &columnName_, const int64_t offset_, const int64_t limit_, const std::string &encoding_, const std::map< std::string, std::string > &options_)
Constructs an AggregateUniqueRequest object with the specified parameters.
std::map< std::string, std::string > options
Optional parameters.
int64_t limit
A positive integer indicating the maximum number of results to be returned, or END_OF_SET (-9999) to ...
std::vector< uint8_t > binaryEncodedResponse
Avro binary encoded response.
std::map< std::string, std::string > info
Additional information.
A set of results returned by GPUdb::aggregateUniqueRaw.
AggregateUniqueRequest(const std::string &tableName_, const std::string &columnName_, const int64_t offset_, const int64_t limit_, const std::map< std::string, std::string > &options_)
Constructs an AggregateUniqueRequest object with the specified parameters.