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 {
50  {
55  tableName(std::string()),
56  columnName(std::string()),
57  offset(int64_t()),
58  limit(int64_t()),
59  encoding(std::string("binary")),
60  options(std::map<std::string, std::string>())
61  {
62  }
63 
300  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_):
301  tableName( tableName_ ),
302  columnName( columnName_ ),
303  offset( offset_ ),
304  limit( limit_ ),
305  encoding( "binary" ),
306  options( options_ )
307  {
308  }
309 
561  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_):
562  tableName( tableName_ ),
563  columnName( columnName_ ),
564  offset( offset_ ),
565  limit( limit_ ),
566  encoding( encoding_ ),
567  options( options_ )
568  {
569  }
570 
577  std::string tableName;
578 
583  std::string columnName;
584 
591  int64_t offset;
592 
606  int64_t limit;
607 
621  std::string encoding;
622 
766  std::map<std::string, std::string> options;
767  };
768 } // end namespace gpudb
769 
770 namespace avro
771 {
772  template<> struct codec_traits<gpudb::AggregateUniqueRequest>
773  {
774  static void encode(Encoder& e, const gpudb::AggregateUniqueRequest& v)
775  {
776  ::avro::encode(e, v.tableName);
777  ::avro::encode(e, v.columnName);
778  ::avro::encode(e, v.offset);
779  ::avro::encode(e, v.limit);
780  ::avro::encode(e, v.encoding);
781  ::avro::encode(e, v.options);
782  }
783 
784  static void decode(Decoder& d, gpudb::AggregateUniqueRequest& v)
785  {
786  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
787  {
788  const std::vector<size_t> fo = rd->fieldOrder();
789 
790  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
791  {
792  switch (*it)
793  {
794  case 0:
795  ::avro::decode(d, v.tableName);
796  break;
797 
798  case 1:
799  ::avro::decode(d, v.columnName);
800  break;
801 
802  case 2:
803  ::avro::decode(d, v.offset);
804  break;
805 
806  case 3:
807  ::avro::decode(d, v.limit);
808  break;
809 
810  case 4:
811  ::avro::decode(d, v.encoding);
812  break;
813 
814  case 5:
815  ::avro::decode(d, v.options);
816  break;
817 
818  default:
819  break;
820  }
821  }
822  }
823  else
824  {
825  ::avro::decode(d, v.tableName);
826  ::avro::decode(d, v.columnName);
827  ::avro::decode(d, v.offset);
828  ::avro::decode(d, v.limit);
829  ::avro::decode(d, v.encoding);
830  ::avro::decode(d, v.options);
831  }
832  }
833  };
834 } // end namespace avro
835 
836 namespace gpudb
837 {
844  {
850  tableName(std::string()),
851  responseSchemaStr(std::string()),
852  binaryEncodedResponse(std::vector<uint8_t>()),
853  jsonEncodedResponse(std::string()),
854  hasMoreRecords(bool()),
855  info(std::map<std::string, std::string>())
856  {
857  }
858 
862  std::string tableName;
863 
868  std::string responseSchemaStr;
869 
873  std::vector<uint8_t> binaryEncodedResponse;
874 
878  std::string jsonEncodedResponse;
879 
884 
895  std::map<std::string, std::string> info;
896  };
897 } // end namespace gpudb
898 
899 namespace avro
900 {
901  template<> struct codec_traits<gpudb::RawAggregateUniqueResponse>
902  {
903  static void encode(Encoder& e, const gpudb::RawAggregateUniqueResponse& v)
904  {
905  ::avro::encode(e, v.tableName);
906  ::avro::encode(e, v.responseSchemaStr);
907  ::avro::encode(e, v.binaryEncodedResponse);
908  ::avro::encode(e, v.jsonEncodedResponse);
909  ::avro::encode(e, v.hasMoreRecords);
910  ::avro::encode(e, v.info);
911  }
912 
913  static void decode(Decoder& d, gpudb::RawAggregateUniqueResponse& v)
914  {
915  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
916  {
917  const std::vector<size_t> fo = rd->fieldOrder();
918 
919  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
920  {
921  switch (*it)
922  {
923  case 0:
924  ::avro::decode(d, v.tableName);
925  break;
926 
927  case 1:
928  ::avro::decode(d, v.responseSchemaStr);
929  break;
930 
931  case 2:
932  ::avro::decode(d, v.binaryEncodedResponse);
933  break;
934 
935  case 3:
936  ::avro::decode(d, v.jsonEncodedResponse);
937  break;
938 
939  case 4:
940  ::avro::decode(d, v.hasMoreRecords);
941  break;
942 
943  case 5:
944  ::avro::decode(d, v.info);
945  break;
946 
947  default:
948  break;
949  }
950  }
951  }
952  else
953  {
954  ::avro::decode(d, v.tableName);
955  ::avro::decode(d, v.responseSchemaStr);
956  ::avro::decode(d, v.binaryEncodedResponse);
957  ::avro::decode(d, v.jsonEncodedResponse);
958  ::avro::decode(d, v.hasMoreRecords);
959  ::avro::decode(d, v.info);
960  }
961  }
962  };
963 } // end namespace avro
964 
965 namespace gpudb
966 {
973  {
979  tableName(std::string()),
980  responseSchemaStr(std::string()),
981  data(std::vector<gpudb::GenericRecord>()),
982  hasMoreRecords(bool()),
983  info(std::map<std::string, std::string>()),
984  dataTypePtr((gpudb::Type*)NULL)
985  {
986  }
987 
991  std::string tableName;
992 
996  std::string responseSchemaStr;
997 
1001  std::vector<gpudb::GenericRecord> data;
1002 
1007 
1018  std::map<std::string, std::string> info;
1019 
1021  };
1022 } // end namespace gpudb
1023 
1024 #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.