GPUdb C++ API  Version 7.2.3.0
create_union.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __CREATE_UNION_H__
7 #define __CREATE_UNION_H__
8 
9 namespace gpudb
10 {
39  {
44  tableName(std::string()),
45  tableNames(std::vector<std::string>()),
46  inputColumnNames(std::vector<std::vector<std::string> >()),
47  outputColumnNames(std::vector<std::string>()),
48  options(std::map<std::string, std::string>())
49  {
50  }
51 
265  CreateUnionRequest(const std::string& tableName_, const std::vector<std::string>& tableNames_, const std::vector<std::vector<std::string> >& inputColumnNames_, const std::vector<std::string>& outputColumnNames_, const std::map<std::string, std::string>& options_):
266  tableName( tableName_ ),
267  tableNames( tableNames_ ),
268  inputColumnNames( inputColumnNames_ ),
269  outputColumnNames( outputColumnNames_ ),
270  options( options_ )
271  {
272  }
273 
282  std::string tableName;
283 
291  std::vector<std::string> tableNames;
292 
296  std::vector<std::vector<std::string> > inputColumnNames;
297 
301  std::vector<std::string> outputColumnNames;
302 
433  std::map<std::string, std::string> options;
434  };
435 } // end namespace gpudb
436 
437 namespace avro
438 {
439  template<> struct codec_traits<gpudb::CreateUnionRequest>
440  {
441  static void encode(Encoder& e, const gpudb::CreateUnionRequest& v)
442  {
443  ::avro::encode(e, v.tableName);
444  ::avro::encode(e, v.tableNames);
445  ::avro::encode(e, v.inputColumnNames);
446  ::avro::encode(e, v.outputColumnNames);
447  ::avro::encode(e, v.options);
448  }
449 
450  static void decode(Decoder& d, gpudb::CreateUnionRequest& v)
451  {
452  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
453  {
454  const std::vector<size_t> fo = rd->fieldOrder();
455 
456  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
457  {
458  switch (*it)
459  {
460  case 0:
461  ::avro::decode(d, v.tableName);
462  break;
463 
464  case 1:
465  ::avro::decode(d, v.tableNames);
466  break;
467 
468  case 2:
469  ::avro::decode(d, v.inputColumnNames);
470  break;
471 
472  case 3:
473  ::avro::decode(d, v.outputColumnNames);
474  break;
475 
476  case 4:
477  ::avro::decode(d, v.options);
478  break;
479 
480  default:
481  break;
482  }
483  }
484  }
485  else
486  {
487  ::avro::decode(d, v.tableName);
488  ::avro::decode(d, v.tableNames);
489  ::avro::decode(d, v.inputColumnNames);
490  ::avro::decode(d, v.outputColumnNames);
491  ::avro::decode(d, v.options);
492  }
493  }
494  };
495 } // end namespace avro
496 
497 namespace gpudb
498 {
505  {
510  tableName(std::string()),
511  info(std::map<std::string, std::string>())
512  {
513  }
514 
518  std::string tableName;
519 
531  std::map<std::string, std::string> info;
532  };
533 } // end namespace gpudb
534 
535 namespace avro
536 {
537  template<> struct codec_traits<gpudb::CreateUnionResponse>
538  {
539  static void encode(Encoder& e, const gpudb::CreateUnionResponse& v)
540  {
541  ::avro::encode(e, v.tableName);
542  ::avro::encode(e, v.info);
543  }
544 
545  static void decode(Decoder& d, gpudb::CreateUnionResponse& v)
546  {
547  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
548  {
549  const std::vector<size_t> fo = rd->fieldOrder();
550 
551  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
552  {
553  switch (*it)
554  {
555  case 0:
556  ::avro::decode(d, v.tableName);
557  break;
558 
559  case 1:
560  ::avro::decode(d, v.info);
561  break;
562 
563  default:
564  break;
565  }
566  }
567  }
568  else
569  {
570  ::avro::decode(d, v.tableName);
571  ::avro::decode(d, v.info);
572  }
573  }
574  };
575 } // end namespace avro
576 
577 #endif // __CREATE_UNION_H__
std::vector< std::string > tableNames
The list of table names to merge, in [ schema_name. ]table_name format, using standard name resolutio...
Definition: create_union.h:291
CreateUnionResponse()
Constructs a CreateUnionResponse object with default parameters.
Definition: create_union.h:509
A set of parameters for GPUdb::createUnion.
Definition: create_union.h:38
std::vector< std::string > outputColumnNames
The list of names of the columns to be stored in the output table.
Definition: create_union.h:301
std::map< std::string, std::string > options
Optional parameters.
Definition: create_union.h:433
CreateUnionRequest(const std::string &tableName_, const std::vector< std::string > &tableNames_, const std::vector< std::vector< std::string > > &inputColumnNames_, const std::vector< std::string > &outputColumnNames_, const std::map< std::string, std::string > &options_)
Constructs a CreateUnionRequest object with the specified parameters.
Definition: create_union.h:265
std::map< std::string, std::string > info
Additional information.
Definition: create_union.h:531
A set of results returned by GPUdb::createUnion.
Definition: create_union.h:504
std::string tableName
Value of tableName.
Definition: create_union.h:518
std::vector< std::vector< std::string > > inputColumnNames
The list of columns from each of the corresponding input tables.
Definition: create_union.h:296
CreateUnionRequest()
Constructs a CreateUnionRequest object with default parameters.
Definition: create_union.h:43
std::string tableName
Name of the table to be created, in [ schema_name. ]table_name format, using standard name resolution...
Definition: create_union.h:282