GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
aggregate_group_by.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb 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 {
13 
86  {
87 
93  tableName(std::string()),
94  columnNames(std::vector<std::string>()),
95  offset(int64_t()),
96  limit(int64_t()),
97  encoding(std::string("binary")),
98  options(std::map<std::string, std::string>())
99  {
100  }
101 
288  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_):
289  tableName( tableName_ ),
290  columnNames( columnNames_ ),
291  offset( offset_ ),
292  limit( limit_ ),
293  encoding( "binary" ),
294  options( options_ )
295  {
296  }
297 
495  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_):
496  tableName( tableName_ ),
497  columnNames( columnNames_ ),
498  offset( offset_ ),
499  limit( limit_ ),
500  encoding( encoding_ ),
501  options( options_ )
502  {
503  }
504 
505  std::string tableName;
506  std::vector<std::string> columnNames;
507  int64_t offset;
508  int64_t limit;
509  std::string encoding;
510  std::map<std::string, std::string> options;
511  };
512 }
513 
514 namespace avro
515 {
516  template<> struct codec_traits<gpudb::AggregateGroupByRequest>
517  {
518  static void encode(Encoder& e, const gpudb::AggregateGroupByRequest& v)
519  {
520  ::avro::encode(e, v.tableName);
521  ::avro::encode(e, v.columnNames);
522  ::avro::encode(e, v.offset);
523  ::avro::encode(e, v.limit);
524  ::avro::encode(e, v.encoding);
525  ::avro::encode(e, v.options);
526  }
527 
528  static void decode(Decoder& d, gpudb::AggregateGroupByRequest& v)
529  {
530  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
531  {
532  const std::vector<size_t> fo = rd->fieldOrder();
533 
534  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
535  {
536  switch (*it)
537  {
538  case 0:
539  ::avro::decode(d, v.tableName);
540  break;
541 
542  case 1:
543  ::avro::decode(d, v.columnNames);
544  break;
545 
546  case 2:
547  ::avro::decode(d, v.offset);
548  break;
549 
550  case 3:
551  ::avro::decode(d, v.limit);
552  break;
553 
554  case 4:
555  ::avro::decode(d, v.encoding);
556  break;
557 
558  case 5:
559  ::avro::decode(d, v.options);
560  break;
561 
562  default:
563  break;
564  }
565  }
566  }
567  else
568  {
569  ::avro::decode(d, v.tableName);
570  ::avro::decode(d, v.columnNames);
571  ::avro::decode(d, v.offset);
572  ::avro::decode(d, v.limit);
573  ::avro::decode(d, v.encoding);
574  ::avro::decode(d, v.options);
575  }
576  }
577  };
578 }
579 
580 namespace gpudb
581 {
582 
655  {
656 
662  responseSchemaStr(std::string()),
663  binaryEncodedResponse(std::vector<uint8_t>()),
664  jsonEncodedResponse(std::string()),
665  totalNumberOfRecords(int64_t()),
666  hasMoreRecords(bool()),
667  info(std::map<std::string, std::string>())
668  {
669  }
670 
671  std::string responseSchemaStr;
672  std::vector<uint8_t> binaryEncodedResponse;
673  std::string jsonEncodedResponse;
676  std::map<std::string, std::string> info;
677  };
678 }
679 
680 namespace avro
681 {
682  template<> struct codec_traits<gpudb::RawAggregateGroupByResponse>
683  {
684  static void encode(Encoder& e, const gpudb::RawAggregateGroupByResponse& v)
685  {
686  ::avro::encode(e, v.responseSchemaStr);
687  ::avro::encode(e, v.binaryEncodedResponse);
688  ::avro::encode(e, v.jsonEncodedResponse);
689  ::avro::encode(e, v.totalNumberOfRecords);
690  ::avro::encode(e, v.hasMoreRecords);
691  ::avro::encode(e, v.info);
692  }
693 
694  static void decode(Decoder& d, gpudb::RawAggregateGroupByResponse& v)
695  {
696  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
697  {
698  const std::vector<size_t> fo = rd->fieldOrder();
699 
700  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
701  {
702  switch (*it)
703  {
704  case 0:
705  ::avro::decode(d, v.responseSchemaStr);
706  break;
707 
708  case 1:
709  ::avro::decode(d, v.binaryEncodedResponse);
710  break;
711 
712  case 2:
713  ::avro::decode(d, v.jsonEncodedResponse);
714  break;
715 
716  case 3:
717  ::avro::decode(d, v.totalNumberOfRecords);
718  break;
719 
720  case 4:
721  ::avro::decode(d, v.hasMoreRecords);
722  break;
723 
724  case 5:
725  ::avro::decode(d, v.info);
726  break;
727 
728  default:
729  break;
730  }
731  }
732  }
733  else
734  {
735  ::avro::decode(d, v.responseSchemaStr);
736  ::avro::decode(d, v.binaryEncodedResponse);
737  ::avro::decode(d, v.jsonEncodedResponse);
738  ::avro::decode(d, v.totalNumberOfRecords);
739  ::avro::decode(d, v.hasMoreRecords);
740  ::avro::decode(d, v.info);
741  }
742  }
743  };
744 }
745 
746 namespace gpudb
747 {
748 
821  {
822 
828  responseSchemaStr(std::string()),
829  data(std::vector<gpudb::GenericRecord>()),
830  totalNumberOfRecords(int64_t()),
831  hasMoreRecords(bool()),
832  info(std::map<std::string, std::string>()),
833  dataTypePtr((gpudb::Type*)NULL)
834  {
835  }
836 
837  std::string responseSchemaStr;
838  std::vector<gpudb::GenericRecord> data;
841  std::map<std::string, std::string> info;
843  };
844 }
845 
846 #endif
A set of output parameters for const.
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
A set of input parameters for const.
AggregateGroupByResponse()
Constructs an AggregateGroupByResponse object with default parameter values.
std::vector< std::string > columnNames
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::vector< uint8_t > binaryEncodedResponse
std::map< std::string, std::string > info
AggregateGroupByRequest()
Constructs an AggregateGroupByRequest object with default parameter values.
A set of output parameters for const.
RawAggregateGroupByResponse()
Constructs a RawAggregateGroupByResponse object with default parameter values.
std::map< std::string, std::string > info
std::map< std::string, std::string > options
std::vector< gpudb::GenericRecord > data