GPUdb C++ API  Version 6.2.0.3
create_projection.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 __CREATE_PROJECTION_H__
7 #define __CREATE_PROJECTION_H__
8 
9 namespace gpudb
10 {
11 
40  {
41 
47  tableName(std::string()),
48  projectionName(std::string()),
49  columnNames(std::vector<std::string>()),
50  options(std::map<std::string, std::string>())
51  {
52  }
53 
172  CreateProjectionRequest(const std::string& tableName_, const std::string& projectionName_, const std::vector<std::string>& columnNames_, const std::map<std::string, std::string>& options_):
173  tableName( tableName_ ),
174  projectionName( projectionName_ ),
175  columnNames( columnNames_ ),
176  options( options_ )
177  {
178  }
179 
180  std::string tableName;
181  std::string projectionName;
182  std::vector<std::string> columnNames;
183  std::map<std::string, std::string> options;
184  };
185 }
186 
187 namespace avro
188 {
189  template<> struct codec_traits<gpudb::CreateProjectionRequest>
190  {
191  static void encode(Encoder& e, const gpudb::CreateProjectionRequest& v)
192  {
193  ::avro::encode(e, v.tableName);
194  ::avro::encode(e, v.projectionName);
195  ::avro::encode(e, v.columnNames);
196  ::avro::encode(e, v.options);
197  }
198 
199  static void decode(Decoder& d, gpudb::CreateProjectionRequest& v)
200  {
201  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
202  {
203  const std::vector<size_t> fo = rd->fieldOrder();
204 
205  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
206  {
207  switch (*it)
208  {
209  case 0:
210  ::avro::decode(d, v.tableName);
211  break;
212 
213  case 1:
214  ::avro::decode(d, v.projectionName);
215  break;
216 
217  case 2:
218  ::avro::decode(d, v.columnNames);
219  break;
220 
221  case 3:
222  ::avro::decode(d, v.options);
223  break;
224 
225  default:
226  break;
227  }
228  }
229  }
230  else
231  {
232  ::avro::decode(d, v.tableName);
233  ::avro::decode(d, v.projectionName);
234  ::avro::decode(d, v.columnNames);
235  ::avro::decode(d, v.options);
236  }
237  }
238  };
239 }
240 
241 namespace gpudb
242 {
243 
272  {
273 
279  projectionName(std::string())
280  {
281  }
282 
283  std::string projectionName;
284  };
285 }
286 
287 namespace avro
288 {
289  template<> struct codec_traits<gpudb::CreateProjectionResponse>
290  {
291  static void encode(Encoder& e, const gpudb::CreateProjectionResponse& v)
292  {
293  ::avro::encode(e, v.projectionName);
294  }
295 
296  static void decode(Decoder& d, gpudb::CreateProjectionResponse& v)
297  {
298  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
299  {
300  const std::vector<size_t> fo = rd->fieldOrder();
301 
302  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
303  {
304  switch (*it)
305  {
306  case 0:
307  ::avro::decode(d, v.projectionName);
308  break;
309 
310  default:
311  break;
312  }
313  }
314  }
315  else
316  {
317  ::avro::decode(d, v.projectionName);
318  }
319  }
320  };
321 }
322 
323 #endif
CreateProjectionResponse()
Constructs a CreateProjectionResponse object with default parameter values.
A set of output parameters for createProjection(const CreateProjectionRequest&) const.
std::map< std::string, std::string > options
CreateProjectionRequest()
Constructs a CreateProjectionRequest object with default parameter values.
CreateProjectionRequest(const std::string &tableName_, const std::string &projectionName_, const std::vector< std::string > &columnNames_, const std::map< std::string, std::string > &options_)
Constructs a CreateProjectionRequest object with the specified parameters.
std::vector< std::string > columnNames
A set of input parameters for createProjection(const CreateProjectionRequest&) const.