GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
filter_by_area.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_AREA_H__
7 #define __FILTER_BY_AREA_H__
8 
9 namespace gpudb
10 {
11 
25  {
26 
32  tableName(std::string()),
33  viewName(std::string()),
34  xColumnName(std::string()),
35  xVector(std::vector<double>()),
36  yColumnName(std::string()),
37  yVector(std::vector<double>()),
38  options(std::map<std::string, std::string>())
39  {
40  }
41 
78  FilterByAreaRequest(const std::string& tableName_, const std::string& viewName_, const std::string& xColumnName_, const std::vector<double>& xVector_, const std::string& yColumnName_, const std::vector<double>& yVector_, const std::map<std::string, std::string>& options_):
79  tableName( tableName_ ),
80  viewName( viewName_ ),
81  xColumnName( xColumnName_ ),
82  xVector( xVector_ ),
83  yColumnName( yColumnName_ ),
84  yVector( yVector_ ),
85  options( options_ )
86  {
87  }
88 
89  std::string tableName;
90  std::string viewName;
91  std::string xColumnName;
92  std::vector<double> xVector;
93  std::string yColumnName;
94  std::vector<double> yVector;
95  std::map<std::string, std::string> options;
96  };
97 }
98 
99 namespace avro
100 {
101  template<> struct codec_traits<gpudb::FilterByAreaRequest>
102  {
103  static void encode(Encoder& e, const gpudb::FilterByAreaRequest& v)
104  {
105  ::avro::encode(e, v.tableName);
106  ::avro::encode(e, v.viewName);
107  ::avro::encode(e, v.xColumnName);
108  ::avro::encode(e, v.xVector);
109  ::avro::encode(e, v.yColumnName);
110  ::avro::encode(e, v.yVector);
111  ::avro::encode(e, v.options);
112  }
113 
114  static void decode(Decoder& d, gpudb::FilterByAreaRequest& v)
115  {
116  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
117  {
118  const std::vector<size_t> fo = rd->fieldOrder();
119 
120  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
121  {
122  switch (*it)
123  {
124  case 0:
125  ::avro::decode(d, v.tableName);
126  break;
127 
128  case 1:
129  ::avro::decode(d, v.viewName);
130  break;
131 
132  case 2:
133  ::avro::decode(d, v.xColumnName);
134  break;
135 
136  case 3:
137  ::avro::decode(d, v.xVector);
138  break;
139 
140  case 4:
141  ::avro::decode(d, v.yColumnName);
142  break;
143 
144  case 5:
145  ::avro::decode(d, v.yVector);
146  break;
147 
148  case 6:
149  ::avro::decode(d, v.options);
150  break;
151 
152  default:
153  break;
154  }
155  }
156  }
157  else
158  {
159  ::avro::decode(d, v.tableName);
160  ::avro::decode(d, v.viewName);
161  ::avro::decode(d, v.xColumnName);
162  ::avro::decode(d, v.xVector);
163  ::avro::decode(d, v.yColumnName);
164  ::avro::decode(d, v.yVector);
165  ::avro::decode(d, v.options);
166  }
167  }
168  };
169 }
170 
171 namespace gpudb
172 {
173 
187  {
188 
194  count(int64_t()),
195  info(std::map<std::string, std::string>())
196  {
197  }
198 
199  int64_t count;
200  std::map<std::string, std::string> info;
201  };
202 }
203 
204 namespace avro
205 {
206  template<> struct codec_traits<gpudb::FilterByAreaResponse>
207  {
208  static void encode(Encoder& e, const gpudb::FilterByAreaResponse& v)
209  {
210  ::avro::encode(e, v.count);
211  ::avro::encode(e, v.info);
212  }
213 
214  static void decode(Decoder& d, gpudb::FilterByAreaResponse& v)
215  {
216  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
217  {
218  const std::vector<size_t> fo = rd->fieldOrder();
219 
220  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
221  {
222  switch (*it)
223  {
224  case 0:
225  ::avro::decode(d, v.count);
226  break;
227 
228  case 1:
229  ::avro::decode(d, v.info);
230  break;
231 
232  default:
233  break;
234  }
235  }
236  }
237  else
238  {
239  ::avro::decode(d, v.count);
240  ::avro::decode(d, v.info);
241  }
242  }
243  };
244 }
245 
246 #endif
FilterByAreaResponse()
Constructs a FilterByAreaResponse object with default parameter values.
std::map< std::string, std::string > info
A set of input parameters for const.
FilterByAreaRequest(const std::string &tableName_, const std::string &viewName_, const std::string &xColumnName_, const std::vector< double > &xVector_, const std::string &yColumnName_, const std::vector< double > &yVector_, const std::map< std::string, std::string > &options_)
Constructs a FilterByAreaRequest object with the specified parameters.
FilterByAreaRequest()
Constructs a FilterByAreaRequest object with default parameter values.
std::vector< double > xVector
A set of output parameters for const.
std::vector< double > yVector
std::map< std::string, std::string > options