GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
filter_by_box.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 __FILTER_BY_BOX_H__
7 #define __FILTER_BY_BOX_H__
8 
9 namespace gpudb
10 {
11 
24  {
25 
31  tableName(std::string()),
32  viewName(std::string()),
33  xColumnName(std::string()),
34  minX(double()),
35  maxX(double()),
36  yColumnName(std::string()),
37  minY(double()),
38  maxY(double()),
39  options(std::map<std::string, std::string>())
40  {
41  }
42 
82  FilterByBoxRequest(const std::string& tableName_, const std::string& viewName_, const std::string& xColumnName_, const double minX_, const double maxX_, const std::string& yColumnName_, const double minY_, const double maxY_, const std::map<std::string, std::string>& options_):
83  tableName( tableName_ ),
84  viewName( viewName_ ),
85  xColumnName( xColumnName_ ),
86  minX( minX_ ),
87  maxX( maxX_ ),
88  yColumnName( yColumnName_ ),
89  minY( minY_ ),
90  maxY( maxY_ ),
91  options( options_ )
92  {
93  }
94 
95  std::string tableName;
96  std::string viewName;
97  std::string xColumnName;
98  double minX;
99  double maxX;
100  std::string yColumnName;
101  double minY;
102  double maxY;
103  std::map<std::string, std::string> options;
104  };
105 }
106 
107 namespace avro
108 {
109  template<> struct codec_traits<gpudb::FilterByBoxRequest>
110  {
111  static void encode(Encoder& e, const gpudb::FilterByBoxRequest& v)
112  {
113  ::avro::encode(e, v.tableName);
114  ::avro::encode(e, v.viewName);
115  ::avro::encode(e, v.xColumnName);
116  ::avro::encode(e, v.minX);
117  ::avro::encode(e, v.maxX);
118  ::avro::encode(e, v.yColumnName);
119  ::avro::encode(e, v.minY);
120  ::avro::encode(e, v.maxY);
121  ::avro::encode(e, v.options);
122  }
123 
124  static void decode(Decoder& d, gpudb::FilterByBoxRequest& v)
125  {
126  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
127  {
128  const std::vector<size_t> fo = rd->fieldOrder();
129 
130  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
131  {
132  switch (*it)
133  {
134  case 0:
135  ::avro::decode(d, v.tableName);
136  break;
137 
138  case 1:
139  ::avro::decode(d, v.viewName);
140  break;
141 
142  case 2:
143  ::avro::decode(d, v.xColumnName);
144  break;
145 
146  case 3:
147  ::avro::decode(d, v.minX);
148  break;
149 
150  case 4:
151  ::avro::decode(d, v.maxX);
152  break;
153 
154  case 5:
155  ::avro::decode(d, v.yColumnName);
156  break;
157 
158  case 6:
159  ::avro::decode(d, v.minY);
160  break;
161 
162  case 7:
163  ::avro::decode(d, v.maxY);
164  break;
165 
166  case 8:
167  ::avro::decode(d, v.options);
168  break;
169 
170  default:
171  break;
172  }
173  }
174  }
175  else
176  {
177  ::avro::decode(d, v.tableName);
178  ::avro::decode(d, v.viewName);
179  ::avro::decode(d, v.xColumnName);
180  ::avro::decode(d, v.minX);
181  ::avro::decode(d, v.maxX);
182  ::avro::decode(d, v.yColumnName);
183  ::avro::decode(d, v.minY);
184  ::avro::decode(d, v.maxY);
185  ::avro::decode(d, v.options);
186  }
187  }
188  };
189 }
190 
191 namespace gpudb
192 {
193 
206  {
207 
213  count(int64_t()),
214  info(std::map<std::string, std::string>())
215  {
216  }
217 
218  int64_t count;
219  std::map<std::string, std::string> info;
220  };
221 }
222 
223 namespace avro
224 {
225  template<> struct codec_traits<gpudb::FilterByBoxResponse>
226  {
227  static void encode(Encoder& e, const gpudb::FilterByBoxResponse& v)
228  {
229  ::avro::encode(e, v.count);
230  ::avro::encode(e, v.info);
231  }
232 
233  static void decode(Decoder& d, gpudb::FilterByBoxResponse& v)
234  {
235  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
236  {
237  const std::vector<size_t> fo = rd->fieldOrder();
238 
239  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
240  {
241  switch (*it)
242  {
243  case 0:
244  ::avro::decode(d, v.count);
245  break;
246 
247  case 1:
248  ::avro::decode(d, v.info);
249  break;
250 
251  default:
252  break;
253  }
254  }
255  }
256  else
257  {
258  ::avro::decode(d, v.count);
259  ::avro::decode(d, v.info);
260  }
261  }
262  };
263 }
264 
265 #endif
A set of input parameters for const.
Definition: filter_by_box.h:23
FilterByBoxRequest(const std::string &tableName_, const std::string &viewName_, const std::string &xColumnName_, const double minX_, const double maxX_, const std::string &yColumnName_, const double minY_, const double maxY_, const std::map< std::string, std::string > &options_)
Constructs a FilterByBoxRequest object with the specified parameters.
Definition: filter_by_box.h:82
std::map< std::string, std::string > info
FilterByBoxRequest()
Constructs a FilterByBoxRequest object with default parameter values.
Definition: filter_by_box.h:30
std::map< std::string, std::string > options
A set of output parameters for const.
FilterByBoxResponse()
Constructs a FilterByBoxResponse object with default parameter values.