GPUdb C++ API  Version 7.2.2.4
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 
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 
556  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_):
557  tableName( tableName_ ),
558  columnName( columnName_ ),
559  offset( offset_ ),
560  limit( limit_ ),
561  encoding( encoding_ ),
562  options( options_ )
563  {
564  }
565 
572  std::string tableName;
573 
578  std::string columnName;
579 
586  int64_t offset;
587 
601  int64_t limit;
602 
616  std::string encoding;
617 
756  std::map<std::string, std::string> options;
757  };
758 } // end namespace gpudb
759 
760 namespace avro
761 {
762  template<> struct codec_traits<gpudb::AggregateUniqueRequest>
763  {
764  static void encode(Encoder& e, const gpudb::AggregateUniqueRequest& v)
765  {
766  ::avro::encode(e, v.tableName);
767  ::avro::encode(e, v.columnName);
768  ::avro::encode(e, v.offset);
769  ::avro::encode(e, v.limit);
770  ::avro::encode(e, v.encoding);
771  ::avro::encode(e, v.options);
772  }
773 
774  static void decode(Decoder& d, gpudb::AggregateUniqueRequest& v)
775  {
776  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
777  {
778  const std::vector<size_t> fo = rd->fieldOrder();
779 
780  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
781  {
782  switch (*it)
783  {
784  case 0:
785  ::avro::decode(d, v.tableName);
786  break;
787 
788  case 1:
789  ::avro::decode(d, v.columnName);
790  break;
791 
792  case 2:
793  ::avro::decode(d, v.offset);
794  break;
795 
796  case 3:
797  ::avro::decode(d, v.limit);
798  break;
799 
800  case 4:
801  ::avro::decode(d, v.encoding);
802  break;
803 
804  case 5:
805  ::avro::decode(d, v.options);
806  break;
807 
808  default:
809  break;
810  }
811  }
812  }
813  else
814  {
815  ::avro::decode(d, v.tableName);
816  ::avro::decode(d, v.columnName);
817  ::avro::decode(d, v.offset);
818  ::avro::decode(d, v.limit);
819  ::avro::decode(d, v.encoding);
820  ::avro::decode(d, v.options);
821  }
822  }
823  };
824 } // end namespace avro
825 
826 namespace gpudb
827 {
834  {
840  tableName(std::string()),
841  responseSchemaStr(std::string()),
842  binaryEncodedResponse(std::vector<uint8_t>()),
843  jsonEncodedResponse(std::string()),
844  hasMoreRecords(bool()),
845  info(std::map<std::string, std::string>())
846  {
847  }
848 
852  std::string tableName;
853 
858  std::string responseSchemaStr;
859 
863  std::vector<uint8_t> binaryEncodedResponse;
864 
868  std::string jsonEncodedResponse;
869 
874 
885  std::map<std::string, std::string> info;
886  };
887 } // end namespace gpudb
888 
889 namespace avro
890 {
891  template<> struct codec_traits<gpudb::RawAggregateUniqueResponse>
892  {
893  static void encode(Encoder& e, const gpudb::RawAggregateUniqueResponse& v)
894  {
895  ::avro::encode(e, v.tableName);
896  ::avro::encode(e, v.responseSchemaStr);
897  ::avro::encode(e, v.binaryEncodedResponse);
898  ::avro::encode(e, v.jsonEncodedResponse);
899  ::avro::encode(e, v.hasMoreRecords);
900  ::avro::encode(e, v.info);
901  }
902 
903  static void decode(Decoder& d, gpudb::RawAggregateUniqueResponse& v)
904  {
905  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
906  {
907  const std::vector<size_t> fo = rd->fieldOrder();
908 
909  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
910  {
911  switch (*it)
912  {
913  case 0:
914  ::avro::decode(d, v.tableName);
915  break;
916 
917  case 1:
918  ::avro::decode(d, v.responseSchemaStr);
919  break;
920 
921  case 2:
922  ::avro::decode(d, v.binaryEncodedResponse);
923  break;
924 
925  case 3:
926  ::avro::decode(d, v.jsonEncodedResponse);
927  break;
928 
929  case 4:
930  ::avro::decode(d, v.hasMoreRecords);
931  break;
932 
933  case 5:
934  ::avro::decode(d, v.info);
935  break;
936 
937  default:
938  break;
939  }
940  }
941  }
942  else
943  {
944  ::avro::decode(d, v.tableName);
945  ::avro::decode(d, v.responseSchemaStr);
946  ::avro::decode(d, v.binaryEncodedResponse);
947  ::avro::decode(d, v.jsonEncodedResponse);
948  ::avro::decode(d, v.hasMoreRecords);
949  ::avro::decode(d, v.info);
950  }
951  }
952  };
953 } // end namespace avro
954 
955 namespace gpudb
956 {
963  {
969  tableName(std::string()),
970  responseSchemaStr(std::string()),
971  data(std::vector<gpudb::GenericRecord>()),
972  hasMoreRecords(bool()),
973  info(std::map<std::string, std::string>()),
974  dataTypePtr((gpudb::Type*)NULL)
975  {
976  }
977 
981  std::string tableName;
982 
986  std::string responseSchemaStr;
987 
991  std::vector<gpudb::GenericRecord> data;
992 
997 
1008  std::map<std::string, std::string> info;
1009 
1011  };
1012 } // end namespace gpudb
1013 
1014 #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.