GPUdb C++ API  Version 7.1.10.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 
85  {
86 
92  tableName(std::string()),
93  columnNames(std::vector<std::string>()),
94  offset(int64_t()),
95  limit(int64_t()),
96  encoding(std::string("binary")),
97  options(std::map<std::string, std::string>())
98  {
99  }
100 
304  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_):
305  tableName( tableName_ ),
306  columnNames( columnNames_ ),
307  offset( offset_ ),
308  limit( limit_ ),
309  encoding( "binary" ),
310  options( options_ )
311  {
312  }
313 
528  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_):
529  tableName( tableName_ ),
530  columnNames( columnNames_ ),
531  offset( offset_ ),
532  limit( limit_ ),
533  encoding( encoding_ ),
534  options( options_ )
535  {
536  }
537 
538  std::string tableName;
539  std::vector<std::string> columnNames;
540  int64_t offset;
541  int64_t limit;
542  std::string encoding;
543  std::map<std::string, std::string> options;
544  };
545 }
546 
547 namespace avro
548 {
549  template<> struct codec_traits<gpudb::AggregateGroupByRequest>
550  {
551  static void encode(Encoder& e, const gpudb::AggregateGroupByRequest& v)
552  {
553  ::avro::encode(e, v.tableName);
554  ::avro::encode(e, v.columnNames);
555  ::avro::encode(e, v.offset);
556  ::avro::encode(e, v.limit);
557  ::avro::encode(e, v.encoding);
558  ::avro::encode(e, v.options);
559  }
560 
561  static void decode(Decoder& d, gpudb::AggregateGroupByRequest& v)
562  {
563  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
564  {
565  const std::vector<size_t> fo = rd->fieldOrder();
566 
567  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
568  {
569  switch (*it)
570  {
571  case 0:
572  ::avro::decode(d, v.tableName);
573  break;
574 
575  case 1:
576  ::avro::decode(d, v.columnNames);
577  break;
578 
579  case 2:
580  ::avro::decode(d, v.offset);
581  break;
582 
583  case 3:
584  ::avro::decode(d, v.limit);
585  break;
586 
587  case 4:
588  ::avro::decode(d, v.encoding);
589  break;
590 
591  case 5:
592  ::avro::decode(d, v.options);
593  break;
594 
595  default:
596  break;
597  }
598  }
599  }
600  else
601  {
602  ::avro::decode(d, v.tableName);
603  ::avro::decode(d, v.columnNames);
604  ::avro::decode(d, v.offset);
605  ::avro::decode(d, v.limit);
606  ::avro::decode(d, v.encoding);
607  ::avro::decode(d, v.options);
608  }
609  }
610  };
611 }
612 
613 namespace gpudb
614 {
615 
687  {
688 
694  responseSchemaStr(std::string()),
695  binaryEncodedResponse(std::vector<uint8_t>()),
696  jsonEncodedResponse(std::string()),
697  totalNumberOfRecords(int64_t()),
698  hasMoreRecords(bool()),
699  info(std::map<std::string, std::string>())
700  {
701  }
702 
703  std::string responseSchemaStr;
704  std::vector<uint8_t> binaryEncodedResponse;
705  std::string jsonEncodedResponse;
708  std::map<std::string, std::string> info;
709  };
710 }
711 
712 namespace avro
713 {
714  template<> struct codec_traits<gpudb::RawAggregateGroupByResponse>
715  {
716  static void encode(Encoder& e, const gpudb::RawAggregateGroupByResponse& v)
717  {
718  ::avro::encode(e, v.responseSchemaStr);
719  ::avro::encode(e, v.binaryEncodedResponse);
720  ::avro::encode(e, v.jsonEncodedResponse);
721  ::avro::encode(e, v.totalNumberOfRecords);
722  ::avro::encode(e, v.hasMoreRecords);
723  ::avro::encode(e, v.info);
724  }
725 
726  static void decode(Decoder& d, gpudb::RawAggregateGroupByResponse& v)
727  {
728  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
729  {
730  const std::vector<size_t> fo = rd->fieldOrder();
731 
732  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
733  {
734  switch (*it)
735  {
736  case 0:
737  ::avro::decode(d, v.responseSchemaStr);
738  break;
739 
740  case 1:
741  ::avro::decode(d, v.binaryEncodedResponse);
742  break;
743 
744  case 2:
745  ::avro::decode(d, v.jsonEncodedResponse);
746  break;
747 
748  case 3:
749  ::avro::decode(d, v.totalNumberOfRecords);
750  break;
751 
752  case 4:
753  ::avro::decode(d, v.hasMoreRecords);
754  break;
755 
756  case 5:
757  ::avro::decode(d, v.info);
758  break;
759 
760  default:
761  break;
762  }
763  }
764  }
765  else
766  {
767  ::avro::decode(d, v.responseSchemaStr);
768  ::avro::decode(d, v.binaryEncodedResponse);
769  ::avro::decode(d, v.jsonEncodedResponse);
770  ::avro::decode(d, v.totalNumberOfRecords);
771  ::avro::decode(d, v.hasMoreRecords);
772  ::avro::decode(d, v.info);
773  }
774  }
775  };
776 }
777 
778 namespace gpudb
779 {
780 
852  {
853 
859  responseSchemaStr(std::string()),
860  data(std::vector<gpudb::GenericRecord>()),
861  totalNumberOfRecords(int64_t()),
862  hasMoreRecords(bool()),
863  info(std::map<std::string, std::string>()),
864  dataTypePtr((gpudb::Type*)NULL)
865  {
866  }
867 
868  std::string responseSchemaStr;
869  std::vector<gpudb::GenericRecord> data;
872  std::map<std::string, std::string> info;
874  };
875 }
876 
877 #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