GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
54  {
55 
61  tableName(std::string()),
62  projectionName(std::string()),
63  columnNames(std::vector<std::string>()),
64  options(std::map<std::string, std::string>())
65  {
66  }
67 
286  CreateProjectionRequest(const std::string& tableName_, const std::string& projectionName_, const std::vector<std::string>& columnNames_, const std::map<std::string, std::string>& options_):
287  tableName( tableName_ ),
288  projectionName( projectionName_ ),
289  columnNames( columnNames_ ),
290  options( options_ )
291  {
292  }
293 
294  std::string tableName;
295  std::string projectionName;
296  std::vector<std::string> columnNames;
297  std::map<std::string, std::string> options;
298  };
299 }
300 
301 namespace avro
302 {
303  template<> struct codec_traits<gpudb::CreateProjectionRequest>
304  {
305  static void encode(Encoder& e, const gpudb::CreateProjectionRequest& v)
306  {
307  ::avro::encode(e, v.tableName);
308  ::avro::encode(e, v.projectionName);
309  ::avro::encode(e, v.columnNames);
310  ::avro::encode(e, v.options);
311  }
312 
313  static void decode(Decoder& d, gpudb::CreateProjectionRequest& v)
314  {
315  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
316  {
317  const std::vector<size_t> fo = rd->fieldOrder();
318 
319  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
320  {
321  switch (*it)
322  {
323  case 0:
324  ::avro::decode(d, v.tableName);
325  break;
326 
327  case 1:
328  ::avro::decode(d, v.projectionName);
329  break;
330 
331  case 2:
332  ::avro::decode(d, v.columnNames);
333  break;
334 
335  case 3:
336  ::avro::decode(d, v.options);
337  break;
338 
339  default:
340  break;
341  }
342  }
343  }
344  else
345  {
346  ::avro::decode(d, v.tableName);
347  ::avro::decode(d, v.projectionName);
348  ::avro::decode(d, v.columnNames);
349  ::avro::decode(d, v.options);
350  }
351  }
352  };
353 }
354 
355 namespace gpudb
356 {
357 
400  {
401 
407  projectionName(std::string()),
408  info(std::map<std::string, std::string>())
409  {
410  }
411 
412  std::string projectionName;
413  std::map<std::string, std::string> info;
414  };
415 }
416 
417 namespace avro
418 {
419  template<> struct codec_traits<gpudb::CreateProjectionResponse>
420  {
421  static void encode(Encoder& e, const gpudb::CreateProjectionResponse& v)
422  {
423  ::avro::encode(e, v.projectionName);
424  ::avro::encode(e, v.info);
425  }
426 
427  static void decode(Decoder& d, gpudb::CreateProjectionResponse& v)
428  {
429  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
430  {
431  const std::vector<size_t> fo = rd->fieldOrder();
432 
433  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
434  {
435  switch (*it)
436  {
437  case 0:
438  ::avro::decode(d, v.projectionName);
439  break;
440 
441  case 1:
442  ::avro::decode(d, v.info);
443  break;
444 
445  default:
446  break;
447  }
448  }
449  }
450  else
451  {
452  ::avro::decode(d, v.projectionName);
453  ::avro::decode(d, v.info);
454  }
455  }
456  };
457 }
458 
459 #endif
CreateProjectionResponse()
Constructs a CreateProjectionResponse object with default parameter values.
A set of output parameters for 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::map< std::string, std::string > info
std::vector< std::string > columnNames
A set of input parameters for const.