GPUdb C++ API  Version 6.2.0.3
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 
43  {
44 
50  tableName(std::string()),
51  selectExpression(std::string()),
52  columnName(std::string()),
53  valueColumnName(std::string()),
54  stats(std::string()),
55  start(double()),
56  end(double()),
57  interval(double()),
58  options(std::map<std::string, std::string>())
59  {
60  }
61 
108  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_):
109  tableName( tableName_ ),
110  selectExpression( selectExpression_ ),
111  columnName( columnName_ ),
112  valueColumnName( valueColumnName_ ),
113  stats( stats_ ),
114  start( start_ ),
115  end( end_ ),
116  interval( interval_ ),
117  options( options_ )
118  {
119  }
120 
121  std::string tableName;
122  std::string selectExpression;
123  std::string columnName;
124  std::string valueColumnName;
125  std::string stats;
126  double start;
127  double end;
128  double interval;
129  std::map<std::string, std::string> options;
130  };
131 }
132 
133 namespace avro
134 {
135  template<> struct codec_traits<gpudb::AggregateStatisticsByRangeRequest>
136  {
137  static void encode(Encoder& e, const gpudb::AggregateStatisticsByRangeRequest& v)
138  {
139  ::avro::encode(e, v.tableName);
140  ::avro::encode(e, v.selectExpression);
141  ::avro::encode(e, v.columnName);
142  ::avro::encode(e, v.valueColumnName);
143  ::avro::encode(e, v.stats);
144  ::avro::encode(e, v.start);
145  ::avro::encode(e, v.end);
146  ::avro::encode(e, v.interval);
147  ::avro::encode(e, v.options);
148  }
149 
150  static void decode(Decoder& d, gpudb::AggregateStatisticsByRangeRequest& v)
151  {
152  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
153  {
154  const std::vector<size_t> fo = rd->fieldOrder();
155 
156  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
157  {
158  switch (*it)
159  {
160  case 0:
161  ::avro::decode(d, v.tableName);
162  break;
163 
164  case 1:
165  ::avro::decode(d, v.selectExpression);
166  break;
167 
168  case 2:
169  ::avro::decode(d, v.columnName);
170  break;
171 
172  case 3:
173  ::avro::decode(d, v.valueColumnName);
174  break;
175 
176  case 4:
177  ::avro::decode(d, v.stats);
178  break;
179 
180  case 5:
181  ::avro::decode(d, v.start);
182  break;
183 
184  case 6:
185  ::avro::decode(d, v.end);
186  break;
187 
188  case 7:
189  ::avro::decode(d, v.interval);
190  break;
191 
192  case 8:
193  ::avro::decode(d, v.options);
194  break;
195 
196  default:
197  break;
198  }
199  }
200  }
201  else
202  {
203  ::avro::decode(d, v.tableName);
204  ::avro::decode(d, v.selectExpression);
205  ::avro::decode(d, v.columnName);
206  ::avro::decode(d, v.valueColumnName);
207  ::avro::decode(d, v.stats);
208  ::avro::decode(d, v.start);
209  ::avro::decode(d, v.end);
210  ::avro::decode(d, v.interval);
211  ::avro::decode(d, v.options);
212  }
213  }
214  };
215 }
216 
217 namespace gpudb
218 {
219 
251  {
252 
258  stats(std::map<std::string, std::vector<double> >())
259  {
260  }
261 
262  std::map<std::string, std::vector<double> > stats;
263  };
264 }
265 
266 namespace avro
267 {
268  template<> struct codec_traits<gpudb::AggregateStatisticsByRangeResponse>
269  {
270  static void encode(Encoder& e, const gpudb::AggregateStatisticsByRangeResponse& v)
271  {
272  ::avro::encode(e, v.stats);
273  }
274 
275  static void decode(Decoder& d, gpudb::AggregateStatisticsByRangeResponse& 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
AggregateStatisticsByRangeResponse()
Constructs an AggregateStatisticsByRangeResponse object with default parameter values.
AggregateStatisticsByRangeRequest()
Constructs an AggregateStatisticsByRangeRequest object with default parameter values.
A set of input parameters for aggregateStatisticsByRange(const AggregateStatisticsByRangeRequest&) co...
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
A set of output parameters for aggregateStatisticsByRange(const AggregateStatisticsByRangeRequest&) c...