GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
aggregate_statistics.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_STATISTICS_H__
7 #define __AGGREGATE_STATISTICS_H__
8 
9 namespace gpudb
10 {
11 
51  {
52 
58  tableName(std::string()),
59  columnName(std::string()),
60  stats(std::string()),
61  options(std::map<std::string, std::string>())
62  {
63  }
64 
140  AggregateStatisticsRequest(const std::string& tableName_, const std::string& columnName_, const std::string& stats_, const std::map<std::string, std::string>& options_):
141  tableName( tableName_ ),
142  columnName( columnName_ ),
143  stats( stats_ ),
144  options( options_ )
145  {
146  }
147 
148  std::string tableName;
149  std::string columnName;
150  std::string stats;
151  std::map<std::string, std::string> options;
152  };
153 }
154 
155 namespace avro
156 {
157  template<> struct codec_traits<gpudb::AggregateStatisticsRequest>
158  {
159  static void encode(Encoder& e, const gpudb::AggregateStatisticsRequest& v)
160  {
161  ::avro::encode(e, v.tableName);
162  ::avro::encode(e, v.columnName);
163  ::avro::encode(e, v.stats);
164  ::avro::encode(e, v.options);
165  }
166 
167  static void decode(Decoder& d, gpudb::AggregateStatisticsRequest& v)
168  {
169  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
170  {
171  const std::vector<size_t> fo = rd->fieldOrder();
172 
173  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
174  {
175  switch (*it)
176  {
177  case 0:
178  ::avro::decode(d, v.tableName);
179  break;
180 
181  case 1:
182  ::avro::decode(d, v.columnName);
183  break;
184 
185  case 2:
186  ::avro::decode(d, v.stats);
187  break;
188 
189  case 3:
190  ::avro::decode(d, v.options);
191  break;
192 
193  default:
194  break;
195  }
196  }
197  }
198  else
199  {
200  ::avro::decode(d, v.tableName);
201  ::avro::decode(d, v.columnName);
202  ::avro::decode(d, v.stats);
203  ::avro::decode(d, v.options);
204  }
205  }
206  };
207 }
208 
209 namespace gpudb
210 {
211 
251  {
252 
258  stats(std::map<std::string, double>())
259  {
260  }
261 
262  std::map<std::string, double> stats;
263  };
264 }
265 
266 namespace avro
267 {
268  template<> struct codec_traits<gpudb::AggregateStatisticsResponse>
269  {
270  static void encode(Encoder& e, const gpudb::AggregateStatisticsResponse& v)
271  {
272  ::avro::encode(e, v.stats);
273  }
274 
275  static void decode(Decoder& d, gpudb::AggregateStatisticsResponse& v)
276  {
277  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
278  {
279  const std::vector<size_t> fo = rd->fieldOrder();
280 
281  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
282  {
283  switch (*it)
284  {
285  case 0:
286  ::avro::decode(d, v.stats);
287  break;
288 
289  default:
290  break;
291  }
292  }
293  }
294  else
295  {
296  ::avro::decode(d, v.stats);
297  }
298  }
299  };
300 }
301 
302 #endif
AggregateStatisticsRequest()
Constructs an AggregateStatisticsRequest object with default parameter values.
A set of input parameters for const.
A set of output parameters for const.
std::map< std::string, double > stats
AggregateStatisticsResponse()
Constructs an AggregateStatisticsResponse object with default parameter values.
AggregateStatisticsRequest(const std::string &tableName_, const std::string &columnName_, const std::string &stats_, const std::map< std::string, std::string > &options_)
Constructs an AggregateStatisticsRequest object with the specified parameters.
std::map< std::string, std::string > options