GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
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 
106  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_):
107  tableName( tableName_ ),
108  selectExpression( selectExpression_ ),
109  columnName( columnName_ ),
110  valueColumnName( valueColumnName_ ),
111  stats( stats_ ),
112  start( start_ ),
113  end( end_ ),
114  interval( interval_ ),
115  options( options_ )
116  {
117  }
118 
119  std::string tableName;
120  std::string selectExpression;
121  std::string columnName;
122  std::string valueColumnName;
123  std::string stats;
124  double start;
125  double end;
126  double interval;
127  std::map<std::string, std::string> options;
128  };
129 }
130 
131 namespace avro
132 {
133  template<> struct codec_traits<gpudb::AggregateStatisticsByRangeRequest>
134  {
135  static void encode(Encoder& e, const gpudb::AggregateStatisticsByRangeRequest& v)
136  {
137  ::avro::encode(e, v.tableName);
138  ::avro::encode(e, v.selectExpression);
139  ::avro::encode(e, v.columnName);
140  ::avro::encode(e, v.valueColumnName);
141  ::avro::encode(e, v.stats);
142  ::avro::encode(e, v.start);
143  ::avro::encode(e, v.end);
144  ::avro::encode(e, v.interval);
145  ::avro::encode(e, v.options);
146  }
147 
148  static void decode(Decoder& d, gpudb::AggregateStatisticsByRangeRequest& v)
149  {
150  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
151  {
152  const std::vector<size_t> fo = rd->fieldOrder();
153 
154  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
155  {
156  switch (*it)
157  {
158  case 0:
159  ::avro::decode(d, v.tableName);
160  break;
161 
162  case 1:
163  ::avro::decode(d, v.selectExpression);
164  break;
165 
166  case 2:
167  ::avro::decode(d, v.columnName);
168  break;
169 
170  case 3:
171  ::avro::decode(d, v.valueColumnName);
172  break;
173 
174  case 4:
175  ::avro::decode(d, v.stats);
176  break;
177 
178  case 5:
179  ::avro::decode(d, v.start);
180  break;
181 
182  case 6:
183  ::avro::decode(d, v.end);
184  break;
185 
186  case 7:
187  ::avro::decode(d, v.interval);
188  break;
189 
190  case 8:
191  ::avro::decode(d, v.options);
192  break;
193 
194  default:
195  break;
196  }
197  }
198  }
199  else
200  {
201  ::avro::decode(d, v.tableName);
202  ::avro::decode(d, v.selectExpression);
203  ::avro::decode(d, v.columnName);
204  ::avro::decode(d, v.valueColumnName);
205  ::avro::decode(d, v.stats);
206  ::avro::decode(d, v.start);
207  ::avro::decode(d, v.end);
208  ::avro::decode(d, v.interval);
209  ::avro::decode(d, v.options);
210  }
211  }
212  };
213 }
214 
215 namespace gpudb
216 {
217 
246  {
247 
253  stats(std::map<std::string, std::vector<double> >())
254  {
255  }
256 
257  std::map<std::string, std::vector<double> > stats;
258  };
259 }
260 
261 namespace avro
262 {
263  template<> struct codec_traits<gpudb::AggregateStatisticsByRangeResponse>
264  {
265  static void encode(Encoder& e, const gpudb::AggregateStatisticsByRangeResponse& v)
266  {
267  ::avro::encode(e, v.stats);
268  }
269 
270  static void decode(Decoder& d, gpudb::AggregateStatisticsByRangeResponse& v)
271  {
272  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
273  {
274  const std::vector<size_t> fo = rd->fieldOrder();
275 
276  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
277  {
278  switch (*it)
279  {
280  case 0:
281  ::avro::decode(d, v.stats);
282  break;
283 
284  default:
285  break;
286  }
287  }
288  }
289  else
290  {
291  ::avro::decode(d, v.stats);
292  }
293  }
294  };
295 }
296 
297 #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