GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
77  {
78 
84  tableName(std::string()),
85  columnName(std::string()),
86  stats(std::string()),
87  options(std::map<std::string, std::string>())
88  {
89  }
90 
172  AggregateStatisticsRequest(const std::string& tableName_, const std::string& columnName_, const std::string& stats_, const std::map<std::string, std::string>& options_):
173  tableName( tableName_ ),
174  columnName( columnName_ ),
175  stats( stats_ ),
176  options( options_ )
177  {
178  }
179 
180  std::string tableName;
181  std::string columnName;
182  std::string stats;
183  std::map<std::string, std::string> options;
184  };
185 }
186 
187 namespace avro
188 {
189  template<> struct codec_traits<gpudb::AggregateStatisticsRequest>
190  {
191  static void encode(Encoder& e, const gpudb::AggregateStatisticsRequest& v)
192  {
193  ::avro::encode(e, v.tableName);
194  ::avro::encode(e, v.columnName);
195  ::avro::encode(e, v.stats);
196  ::avro::encode(e, v.options);
197  }
198 
199  static void decode(Decoder& d, gpudb::AggregateStatisticsRequest& v)
200  {
201  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
202  {
203  const std::vector<size_t> fo = rd->fieldOrder();
204 
205  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
206  {
207  switch (*it)
208  {
209  case 0:
210  ::avro::decode(d, v.tableName);
211  break;
212 
213  case 1:
214  ::avro::decode(d, v.columnName);
215  break;
216 
217  case 2:
218  ::avro::decode(d, v.stats);
219  break;
220 
221  case 3:
222  ::avro::decode(d, v.options);
223  break;
224 
225  default:
226  break;
227  }
228  }
229  }
230  else
231  {
232  ::avro::decode(d, v.tableName);
233  ::avro::decode(d, v.columnName);
234  ::avro::decode(d, v.stats);
235  ::avro::decode(d, v.options);
236  }
237  }
238  };
239 }
240 
241 namespace gpudb
242 {
243 
309  {
310 
316  stats(std::map<std::string, double>()),
317  info(std::map<std::string, std::string>())
318  {
319  }
320 
321  std::map<std::string, double> stats;
322  std::map<std::string, std::string> info;
323  };
324 }
325 
326 namespace avro
327 {
328  template<> struct codec_traits<gpudb::AggregateStatisticsResponse>
329  {
330  static void encode(Encoder& e, const gpudb::AggregateStatisticsResponse& v)
331  {
332  ::avro::encode(e, v.stats);
333  ::avro::encode(e, v.info);
334  }
335 
336  static void decode(Decoder& d, gpudb::AggregateStatisticsResponse& v)
337  {
338  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
339  {
340  const std::vector<size_t> fo = rd->fieldOrder();
341 
342  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
343  {
344  switch (*it)
345  {
346  case 0:
347  ::avro::decode(d, v.stats);
348  break;
349 
350  case 1:
351  ::avro::decode(d, v.info);
352  break;
353 
354  default:
355  break;
356  }
357  }
358  }
359  else
360  {
361  ::avro::decode(d, v.stats);
362  ::avro::decode(d, v.info);
363  }
364  }
365  };
366 }
367 
368 #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.
std::map< std::string, std::string > info
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