GPUdb C++ API  Version 5.2.0.0
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 
40  {
41 
47  tableName(std::string()),
48  selectExpression(std::string()),
49  columnName(std::string()),
50  valueColumnName(std::string()),
51  stats(std::string()),
52  start(double()),
53  end(double()),
54  interval(double()),
55  options(std::map<std::string, std::string>())
56  {
57  }
58 
102  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):
103  tableName(tableName),
104  selectExpression(selectExpression),
105  columnName(columnName),
106  valueColumnName(valueColumnName),
107  stats(stats),
108  start(start),
109  end(end),
110  interval(interval),
111  options(options)
112  {
113  }
114 
115  std::string tableName;
116  std::string selectExpression;
117  std::string columnName;
118  std::string valueColumnName;
119  std::string stats;
120  double start;
121  double end;
122  double interval;
123  std::map<std::string, std::string> options;
124  };
125 }
126 
127 namespace avro
128 {
129  template<> struct codec_traits<gpudb::AggregateStatisticsByRangeRequest>
130  {
131  static void encode(Encoder& e, const gpudb::AggregateStatisticsByRangeRequest& v)
132  {
133  ::avro::encode(e, v.tableName);
134  ::avro::encode(e, v.selectExpression);
135  ::avro::encode(e, v.columnName);
136  ::avro::encode(e, v.valueColumnName);
137  ::avro::encode(e, v.stats);
138  ::avro::encode(e, v.start);
139  ::avro::encode(e, v.end);
140  ::avro::encode(e, v.interval);
141  ::avro::encode(e, v.options);
142  }
143 
144  static void decode(Decoder& d, gpudb::AggregateStatisticsByRangeRequest& v)
145  {
146  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
147  {
148  const std::vector<size_t> fo = rd->fieldOrder();
149 
150  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
151  {
152  switch (*it)
153  {
154  case 0:
155  ::avro::decode(d, v.tableName);
156  break;
157 
158  case 1:
159  ::avro::decode(d, v.selectExpression);
160  break;
161 
162  case 2:
163  ::avro::decode(d, v.columnName);
164  break;
165 
166  case 3:
167  ::avro::decode(d, v.valueColumnName);
168  break;
169 
170  case 4:
171  ::avro::decode(d, v.stats);
172  break;
173 
174  case 5:
175  ::avro::decode(d, v.start);
176  break;
177 
178  case 6:
179  ::avro::decode(d, v.end);
180  break;
181 
182  case 7:
183  ::avro::decode(d, v.interval);
184  break;
185 
186  case 8:
187  ::avro::decode(d, v.options);
188  break;
189 
190  default:
191  break;
192  }
193  }
194  }
195  else
196  {
197  ::avro::decode(d, v.tableName);
198  ::avro::decode(d, v.selectExpression);
199  ::avro::decode(d, v.columnName);
200  ::avro::decode(d, v.valueColumnName);
201  ::avro::decode(d, v.stats);
202  ::avro::decode(d, v.start);
203  ::avro::decode(d, v.end);
204  ::avro::decode(d, v.interval);
205  ::avro::decode(d, v.options);
206  }
207  }
208  };
209 }
210 
211 namespace gpudb
212 {
213 
242  {
243 
249  stats(std::map<std::string, std::vector<double> >())
250  {
251  }
252 
253  std::map<std::string, std::vector<double> > stats;
254  };
255 }
256 
257 namespace avro
258 {
259  template<> struct codec_traits<gpudb::AggregateStatisticsByRangeResponse>
260  {
261  static void encode(Encoder& e, const gpudb::AggregateStatisticsByRangeResponse& v)
262  {
263  ::avro::encode(e, v.stats);
264  }
265 
266  static void decode(Decoder& d, gpudb::AggregateStatisticsByRangeResponse& v)
267  {
268  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
269  {
270  const std::vector<size_t> fo = rd->fieldOrder();
271 
272  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
273  {
274  switch (*it)
275  {
276  case 0:
277  ::avro::decode(d, v.stats);
278  break;
279 
280  default:
281  break;
282  }
283  }
284  }
285  else
286  {
287  ::avro::decode(d, v.stats);
288  }
289  }
290  };
291 }
292 
293 #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.
A set of input parameters for aggregateStatisticsByRange(const AggregateStatisticsByRangeRequest&) co...
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...