GPUdb C++ API  Version 5.2.0.0
aggregate_min_max.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_MIN_MAX_H__
7 #define __AGGREGATE_MIN_MAX_H__
8 
9 namespace gpudb
10 {
11 
20  {
21 
27  tableName(std::string()),
28  columnName(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
46  AggregateMinMaxRequest(const std::string& tableName, const std::string& columnName, const std::map<std::string, std::string>& options):
47  tableName(tableName),
48  columnName(columnName),
49  options(options)
50  {
51  }
52 
53  std::string tableName;
54  std::string columnName;
55  std::map<std::string, std::string> options;
56  };
57 }
58 
59 namespace avro
60 {
61  template<> struct codec_traits<gpudb::AggregateMinMaxRequest>
62  {
63  static void encode(Encoder& e, const gpudb::AggregateMinMaxRequest& v)
64  {
65  ::avro::encode(e, v.tableName);
66  ::avro::encode(e, v.columnName);
67  ::avro::encode(e, v.options);
68  }
69 
70  static void decode(Decoder& d, gpudb::AggregateMinMaxRequest& v)
71  {
72  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
73  {
74  const std::vector<size_t> fo = rd->fieldOrder();
75 
76  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
77  {
78  switch (*it)
79  {
80  case 0:
81  ::avro::decode(d, v.tableName);
82  break;
83 
84  case 1:
85  ::avro::decode(d, v.columnName);
86  break;
87 
88  case 2:
89  ::avro::decode(d, v.options);
90  break;
91 
92  default:
93  break;
94  }
95  }
96  }
97  else
98  {
99  ::avro::decode(d, v.tableName);
100  ::avro::decode(d, v.columnName);
101  ::avro::decode(d, v.options);
102  }
103  }
104  };
105 }
106 
107 namespace gpudb
108 {
109 
118  {
119 
125  min(double()),
126  max(double())
127  {
128  }
129 
130  double min;
131  double max;
132  };
133 }
134 
135 namespace avro
136 {
137  template<> struct codec_traits<gpudb::AggregateMinMaxResponse>
138  {
139  static void encode(Encoder& e, const gpudb::AggregateMinMaxResponse& v)
140  {
141  ::avro::encode(e, v.min);
142  ::avro::encode(e, v.max);
143  }
144 
145  static void decode(Decoder& d, gpudb::AggregateMinMaxResponse& v)
146  {
147  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
148  {
149  const std::vector<size_t> fo = rd->fieldOrder();
150 
151  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
152  {
153  switch (*it)
154  {
155  case 0:
156  ::avro::decode(d, v.min);
157  break;
158 
159  case 1:
160  ::avro::decode(d, v.max);
161  break;
162 
163  default:
164  break;
165  }
166  }
167  }
168  else
169  {
170  ::avro::decode(d, v.min);
171  ::avro::decode(d, v.max);
172  }
173  }
174  };
175 }
176 
177 #endif
std::map< std::string, std::string > options
AggregateMinMaxResponse()
Constructs an AggregateMinMaxResponse object with default parameter values.
AggregateMinMaxRequest(const std::string &tableName, const std::string &columnName, const std::map< std::string, std::string > &options)
Constructs an AggregateMinMaxRequest object with the specified parameters.
AggregateMinMaxRequest()
Constructs an AggregateMinMaxRequest object with default parameter values.
A set of input parameters for aggregateMinMax(const AggregateMinMaxRequest&) const.
A set of output parameters for aggregateMinMax(const AggregateMinMaxRequest&) const.