GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
aggregate_statistics_by_range.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_BY_RANGE_H__
7 #define __AGGREGATE_STATISTICS_BY_RANGE_H__
8 
9 namespace gpudb
10 {
11 
55  {
56 
62  tableName(std::string()),
63  selectExpression(std::string()),
64  columnName(std::string()),
65  valueColumnName(std::string()),
66  stats(std::string()),
67  start(double()),
68  end(double()),
69  interval(double()),
70  options(std::map<std::string, std::string>())
71  {
72  }
73 
123  AggregateStatisticsByRangeRequest(const std::string& tableName_, const std::string& selectExpression_, const std::string& columnName_, const std::string& valueColumnName_, const std::string& stats_, const double start_, const double end_, const double interval_, const std::map<std::string, std::string>& options_):
124  tableName( tableName_ ),
125  selectExpression( selectExpression_ ),
126  columnName( columnName_ ),
127  valueColumnName( valueColumnName_ ),
128  stats( stats_ ),
129  start( start_ ),
130  end( end_ ),
131  interval( interval_ ),
132  options( options_ )
133  {
134  }
135 
136  std::string tableName;
137  std::string selectExpression;
138  std::string columnName;
139  std::string valueColumnName;
140  std::string stats;
141  double start;
142  double end;
143  double interval;
144  std::map<std::string, std::string> options;
145  };
146 }
147 
148 namespace avro
149 {
150  template<> struct codec_traits<gpudb::AggregateStatisticsByRangeRequest>
151  {
152  static void encode(Encoder& e, const gpudb::AggregateStatisticsByRangeRequest& v)
153  {
154  ::avro::encode(e, v.tableName);
155  ::avro::encode(e, v.selectExpression);
156  ::avro::encode(e, v.columnName);
157  ::avro::encode(e, v.valueColumnName);
158  ::avro::encode(e, v.stats);
159  ::avro::encode(e, v.start);
160  ::avro::encode(e, v.end);
161  ::avro::encode(e, v.interval);
162  ::avro::encode(e, v.options);
163  }
164 
165  static void decode(Decoder& d, gpudb::AggregateStatisticsByRangeRequest& v)
166  {
167  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
168  {
169  const std::vector<size_t> fo = rd->fieldOrder();
170 
171  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
172  {
173  switch (*it)
174  {
175  case 0:
176  ::avro::decode(d, v.tableName);
177  break;
178 
179  case 1:
180  ::avro::decode(d, v.selectExpression);
181  break;
182 
183  case 2:
184  ::avro::decode(d, v.columnName);
185  break;
186 
187  case 3:
188  ::avro::decode(d, v.valueColumnName);
189  break;
190 
191  case 4:
192  ::avro::decode(d, v.stats);
193  break;
194 
195  case 5:
196  ::avro::decode(d, v.start);
197  break;
198 
199  case 6:
200  ::avro::decode(d, v.end);
201  break;
202 
203  case 7:
204  ::avro::decode(d, v.interval);
205  break;
206 
207  case 8:
208  ::avro::decode(d, v.options);
209  break;
210 
211  default:
212  break;
213  }
214  }
215  }
216  else
217  {
218  ::avro::decode(d, v.tableName);
219  ::avro::decode(d, v.selectExpression);
220  ::avro::decode(d, v.columnName);
221  ::avro::decode(d, v.valueColumnName);
222  ::avro::decode(d, v.stats);
223  ::avro::decode(d, v.start);
224  ::avro::decode(d, v.end);
225  ::avro::decode(d, v.interval);
226  ::avro::decode(d, v.options);
227  }
228  }
229  };
230 }
231 
232 namespace gpudb
233 {
234 
278  {
279 
285  stats(std::map<std::string, std::vector<double> >()),
286  info(std::map<std::string, std::string>())
287  {
288  }
289 
290  std::map<std::string, std::vector<double> > stats;
291  std::map<std::string, std::string> info;
292  };
293 }
294 
295 namespace avro
296 {
297  template<> struct codec_traits<gpudb::AggregateStatisticsByRangeResponse>
298  {
299  static void encode(Encoder& e, const gpudb::AggregateStatisticsByRangeResponse& v)
300  {
301  ::avro::encode(e, v.stats);
302  ::avro::encode(e, v.info);
303  }
304 
305  static void decode(Decoder& d, gpudb::AggregateStatisticsByRangeResponse& v)
306  {
307  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
308  {
309  const std::vector<size_t> fo = rd->fieldOrder();
310 
311  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
312  {
313  switch (*it)
314  {
315  case 0:
316  ::avro::decode(d, v.stats);
317  break;
318 
319  case 1:
320  ::avro::decode(d, v.info);
321  break;
322 
323  default:
324  break;
325  }
326  }
327  }
328  else
329  {
330  ::avro::decode(d, v.stats);
331  ::avro::decode(d, v.info);
332  }
333  }
334  };
335 }
336 
337 #endif
AggregateStatisticsByRangeResponse()
Constructs an AggregateStatisticsByRangeResponse object with default parameter values.
AggregateStatisticsByRangeRequest()
Constructs an AggregateStatisticsByRangeRequest object with default parameter values.
AggregateStatisticsByRangeRequest(const std::string &tableName_, const std::string &selectExpression_, const std::string &columnName_, const std::string &valueColumnName_, const std::string &stats_, const double start_, const double end_, const double interval_, const std::map< std::string, std::string > &options_)
Constructs an AggregateStatisticsByRangeRequest object with the specified parameters.
std::map< std::string, std::vector< double > > stats
std::map< std::string, std::string > options