GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
aggregate_histogram.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_HISTOGRAM_H__
7 #define __AGGREGATE_HISTOGRAM_H__
8 
9 namespace gpudb
10 {
11 
27  {
28 
34  tableName(std::string()),
35  columnName(std::string()),
36  start(double()),
37  end(double()),
38  interval(double()),
39  options(std::map<std::string, std::string>())
40  {
41  }
42 
70  AggregateHistogramRequest(const std::string& tableName_, const std::string& columnName_, const double start_, const double end_, const double interval_, const std::map<std::string, std::string>& options_):
71  tableName( tableName_ ),
72  columnName( columnName_ ),
73  start( start_ ),
74  end( end_ ),
75  interval( interval_ ),
76  options( options_ )
77  {
78  }
79 
80  std::string tableName;
81  std::string columnName;
82  double start;
83  double end;
84  double interval;
85  std::map<std::string, std::string> options;
86  };
87 }
88 
89 namespace avro
90 {
91  template<> struct codec_traits<gpudb::AggregateHistogramRequest>
92  {
93  static void encode(Encoder& e, const gpudb::AggregateHistogramRequest& v)
94  {
95  ::avro::encode(e, v.tableName);
96  ::avro::encode(e, v.columnName);
97  ::avro::encode(e, v.start);
98  ::avro::encode(e, v.end);
99  ::avro::encode(e, v.interval);
100  ::avro::encode(e, v.options);
101  }
102 
103  static void decode(Decoder& d, gpudb::AggregateHistogramRequest& v)
104  {
105  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
106  {
107  const std::vector<size_t> fo = rd->fieldOrder();
108 
109  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
110  {
111  switch (*it)
112  {
113  case 0:
114  ::avro::decode(d, v.tableName);
115  break;
116 
117  case 1:
118  ::avro::decode(d, v.columnName);
119  break;
120 
121  case 2:
122  ::avro::decode(d, v.start);
123  break;
124 
125  case 3:
126  ::avro::decode(d, v.end);
127  break;
128 
129  case 4:
130  ::avro::decode(d, v.interval);
131  break;
132 
133  case 5:
134  ::avro::decode(d, v.options);
135  break;
136 
137  default:
138  break;
139  }
140  }
141  }
142  else
143  {
144  ::avro::decode(d, v.tableName);
145  ::avro::decode(d, v.columnName);
146  ::avro::decode(d, v.start);
147  ::avro::decode(d, v.end);
148  ::avro::decode(d, v.interval);
149  ::avro::decode(d, v.options);
150  }
151  }
152  };
153 }
154 
155 namespace gpudb
156 {
157 
173  {
174 
180  counts(std::vector<double>()),
181  start(double()),
182  end(double())
183  {
184  }
185 
186  std::vector<double> counts;
187  double start;
188  double end;
189  };
190 }
191 
192 namespace avro
193 {
194  template<> struct codec_traits<gpudb::AggregateHistogramResponse>
195  {
196  static void encode(Encoder& e, const gpudb::AggregateHistogramResponse& v)
197  {
198  ::avro::encode(e, v.counts);
199  ::avro::encode(e, v.start);
200  ::avro::encode(e, v.end);
201  }
202 
203  static void decode(Decoder& d, gpudb::AggregateHistogramResponse& v)
204  {
205  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
206  {
207  const std::vector<size_t> fo = rd->fieldOrder();
208 
209  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
210  {
211  switch (*it)
212  {
213  case 0:
214  ::avro::decode(d, v.counts);
215  break;
216 
217  case 1:
218  ::avro::decode(d, v.start);
219  break;
220 
221  case 2:
222  ::avro::decode(d, v.end);
223  break;
224 
225  default:
226  break;
227  }
228  }
229  }
230  else
231  {
232  ::avro::decode(d, v.counts);
233  ::avro::decode(d, v.start);
234  ::avro::decode(d, v.end);
235  }
236  }
237  };
238 }
239 
240 #endif
AggregateHistogramRequest()
Constructs an AggregateHistogramRequest object with default parameter values.
std::map< std::string, std::string > options
AggregateHistogramRequest(const std::string &tableName_, const std::string &columnName_, const double start_, const double end_, const double interval_, const std::map< std::string, std::string > &options_)
Constructs an AggregateHistogramRequest object with the specified parameters.
AggregateHistogramResponse()
Constructs an AggregateHistogramResponse object with default parameter values.
A set of output parameters for const.
A set of input parameters for const.