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 {
48  {
53  tableName(std::string()),
54  tableNames(std::vector<std::string>()),
55  inputColumnNames(std::vector<std::vector<std::string> >()),
56  outputColumnNames(std::vector<std::string>()),
57  options(std::map<std::string, std::string>())
58  {
59  }
60 
280  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_):
281  tableName( tableName_ ),
282  tableNames( tableNames_ ),
283  inputColumnNames( inputColumnNames_ ),
284  outputColumnNames( outputColumnNames_ ),
285  options( options_ )
286  {
287  }
288 
297  std::string tableName;
298 
306  std::vector<std::string> tableNames;
307 
311  std::vector<std::vector<std::string> > inputColumnNames;
312 
316  std::vector<std::string> outputColumnNames;
317 
452  std::map<std::string, std::string> options;
453  };
454 } // end namespace gpudb
455 
456 namespace avro
457 {
458  template<> struct codec_traits<gpudb::CreateUnionRequest>
459  {
460  static void encode(Encoder& e, const gpudb::CreateUnionRequest& v)
461  {
462  ::avro::encode(e, v.tableName);
463  ::avro::encode(e, v.tableNames);
464  ::avro::encode(e, v.inputColumnNames);
465  ::avro::encode(e, v.outputColumnNames);
466  ::avro::encode(e, v.options);
467  }
468 
469  static void decode(Decoder& d, gpudb::CreateUnionRequest& v)
470  {
471  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
472  {
473  const std::vector<size_t> fo = rd->fieldOrder();
474 
475  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
476  {
477  switch (*it)
478  {
479  case 0:
480  ::avro::decode(d, v.tableName);
481  break;
482 
483  case 1:
484  ::avro::decode(d, v.tableNames);
485  break;
486 
487  case 2:
488  ::avro::decode(d, v.inputColumnNames);
489  break;
490 
491  case 3:
492  ::avro::decode(d, v.outputColumnNames);
493  break;
494 
495  case 4:
496  ::avro::decode(d, v.options);
497  break;
498 
499  default:
500  break;
501  }
502  }
503  }
504  else
505  {
506  ::avro::decode(d, v.tableName);
507  ::avro::decode(d, v.tableNames);
508  ::avro::decode(d, v.inputColumnNames);
509  ::avro::decode(d, v.outputColumnNames);
510  ::avro::decode(d, v.options);
511  }
512  }
513  };
514 } // end namespace avro
515 
516 namespace gpudb
517 {
524  {
529  tableName(std::string()),
530  info(std::map<std::string, std::string>())
531  {
532  }
533 
537  std::string tableName;
538 
550  std::map<std::string, std::string> info;
551  };
552 } // end namespace gpudb
553 
554 namespace avro
555 {
556  template<> struct codec_traits<gpudb::CreateUnionResponse>
557  {
558  static void encode(Encoder& e, const gpudb::CreateUnionResponse& v)
559  {
560  ::avro::encode(e, v.tableName);
561  ::avro::encode(e, v.info);
562  }
563 
564  static void decode(Decoder& d, gpudb::CreateUnionResponse& v)
565  {
566  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
567  {
568  const std::vector<size_t> fo = rd->fieldOrder();
569 
570  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
571  {
572  switch (*it)
573  {
574  case 0:
575  ::avro::decode(d, v.tableName);
576  break;
577 
578  case 1:
579  ::avro::decode(d, v.info);
580  break;
581 
582  default:
583  break;
584  }
585  }
586  }
587  else
588  {
589  ::avro::decode(d, v.tableName);
590  ::avro::decode(d, v.info);
591  }
592  }
593  };
594 } // end namespace avro
595 
596 #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:306
CreateUnionResponse()
Constructs a CreateUnionResponse object with default parameters.
Definition: create_union.h:528
A set of parameters for GPUdb::createUnion.
Definition: create_union.h:47
std::vector< std::string > outputColumnNames
The list of names of the columns to be stored in the output table.
Definition: create_union.h:316
std::map< std::string, std::string > options
Optional parameters.
Definition: create_union.h:452
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:280
std::map< std::string, std::string > info
Additional information.
Definition: create_union.h:550
A set of results returned by GPUdb::createUnion.
Definition: create_union.h:523
std::string tableName
Value of tableName.
Definition: create_union.h:537
std::vector< std::vector< std::string > > inputColumnNames
The list of columns from each of the corresponding input tables.
Definition: create_union.h:311
CreateUnionRequest()
Constructs a CreateUnionRequest object with default parameters.
Definition: create_union.h:52
std::string tableName
Name of the table to be created, in [ schema_name. ]table_name format, using standard name resolution...
Definition: create_union.h:297