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 
301  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_):
302  tableName( tableName_ ),
303  columnName( columnName_ ),
304  offset( offset_ ),
305  limit( limit_ ),
306  encoding( "binary" ),
307  options( options_ )
308  {
309  }
310 
563  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_):
564  tableName( tableName_ ),
565  columnName( columnName_ ),
566  offset( offset_ ),
567  limit( limit_ ),
568  encoding( encoding_ ),
569  options( options_ )
570  {
571  }
572 
579  std::string tableName;
580 
585  std::string columnName;
586 
593  int64_t offset;
594 
608  int64_t limit;
609 
623  std::string encoding;
624 
768  std::map<std::string, std::string> options;
769  };
770 } // end namespace gpudb
771 
772 namespace avro
773 {
774  template<> struct codec_traits<gpudb::AggregateUniqueRequest>
775  {
776  static void encode(Encoder& e, const gpudb::AggregateUniqueRequest& v)
777  {
778  ::avro::encode(e, v.tableName);
779  ::avro::encode(e, v.columnName);
780  ::avro::encode(e, v.offset);
781  ::avro::encode(e, v.limit);
782  ::avro::encode(e, v.encoding);
783  ::avro::encode(e, v.options);
784  }
785 
786  static void decode(Decoder& d, gpudb::AggregateUniqueRequest& v)
787  {
788  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
789  {
790  const std::vector<size_t> fo = rd->fieldOrder();
791 
792  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
793  {
794  switch (*it)
795  {
796  case 0:
797  ::avro::decode(d, v.tableName);
798  break;
799 
800  case 1:
801  ::avro::decode(d, v.columnName);
802  break;
803 
804  case 2:
805  ::avro::decode(d, v.offset);
806  break;
807 
808  case 3:
809  ::avro::decode(d, v.limit);
810  break;
811 
812  case 4:
813  ::avro::decode(d, v.encoding);
814  break;
815 
816  case 5:
817  ::avro::decode(d, v.options);
818  break;
819 
820  default:
821  break;
822  }
823  }
824  }
825  else
826  {
827  ::avro::decode(d, v.tableName);
828  ::avro::decode(d, v.columnName);
829  ::avro::decode(d, v.offset);
830  ::avro::decode(d, v.limit);
831  ::avro::decode(d, v.encoding);
832  ::avro::decode(d, v.options);
833  }
834  }
835  };
836 } // end namespace avro
837 
838 namespace gpudb
839 {
846  {
852  tableName(std::string()),
853  responseSchemaStr(std::string()),
854  binaryEncodedResponse(std::vector<uint8_t>()),
855  jsonEncodedResponse(std::string()),
856  hasMoreRecords(bool()),
857  info(std::map<std::string, std::string>())
858  {
859  }
860 
864  std::string tableName;
865 
870  std::string responseSchemaStr;
871 
875  std::vector<uint8_t> binaryEncodedResponse;
876 
880  std::string jsonEncodedResponse;
881 
886 
897  std::map<std::string, std::string> info;
898  };
899 } // end namespace gpudb
900 
901 namespace avro
902 {
903  template<> struct codec_traits<gpudb::RawAggregateUniqueResponse>
904  {
905  static void encode(Encoder& e, const gpudb::RawAggregateUniqueResponse& v)
906  {
907  ::avro::encode(e, v.tableName);
908  ::avro::encode(e, v.responseSchemaStr);
909  ::avro::encode(e, v.binaryEncodedResponse);
910  ::avro::encode(e, v.jsonEncodedResponse);
911  ::avro::encode(e, v.hasMoreRecords);
912  ::avro::encode(e, v.info);
913  }
914 
915  static void decode(Decoder& d, gpudb::RawAggregateUniqueResponse& v)
916  {
917  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
918  {
919  const std::vector<size_t> fo = rd->fieldOrder();
920 
921  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
922  {
923  switch (*it)
924  {
925  case 0:
926  ::avro::decode(d, v.tableName);
927  break;
928 
929  case 1:
930  ::avro::decode(d, v.responseSchemaStr);
931  break;
932 
933  case 2:
934  ::avro::decode(d, v.binaryEncodedResponse);
935  break;
936 
937  case 3:
938  ::avro::decode(d, v.jsonEncodedResponse);
939  break;
940 
941  case 4:
942  ::avro::decode(d, v.hasMoreRecords);
943  break;
944 
945  case 5:
946  ::avro::decode(d, v.info);
947  break;
948 
949  default:
950  break;
951  }
952  }
953  }
954  else
955  {
956  ::avro::decode(d, v.tableName);
957  ::avro::decode(d, v.responseSchemaStr);
958  ::avro::decode(d, v.binaryEncodedResponse);
959  ::avro::decode(d, v.jsonEncodedResponse);
960  ::avro::decode(d, v.hasMoreRecords);
961  ::avro::decode(d, v.info);
962  }
963  }
964  };
965 } // end namespace avro
966 
967 namespace gpudb
968 {
975  {
981  tableName(std::string()),
982  responseSchemaStr(std::string()),
983  data(std::vector<gpudb::GenericRecord>()),
984  hasMoreRecords(bool()),
985  info(std::map<std::string, std::string>()),
986  dataTypePtr((gpudb::Type*)NULL)
987  {
988  }
989 
993  std::string tableName;
994 
998  std::string responseSchemaStr;
999 
1003  std::vector<gpudb::GenericRecord> data;
1004 
1009 
1020  std::map<std::string, std::string> info;
1021 
1023  };
1024 } // end namespace gpudb
1025 
1026 #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.