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 
349  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_):
350  tableName( tableName_ ),
351  tableNames( tableNames_ ),
352  inputColumnNames( inputColumnNames_ ),
353  outputColumnNames( outputColumnNames_ ),
354  options( options_ )
355  {
356  }
357 
366  std::string tableName;
367 
375  std::vector<std::string> tableNames;
376 
380  std::vector<std::vector<std::string> > inputColumnNames;
381 
385  std::vector<std::string> outputColumnNames;
386 
580  std::map<std::string, std::string> options;
581  };
582 } // end namespace gpudb
583 
584 namespace avro
585 {
586  template<> struct codec_traits<gpudb::CreateUnionRequest>
587  {
588  static void encode(Encoder& e, const gpudb::CreateUnionRequest& v)
589  {
590  ::avro::encode(e, v.tableName);
591  ::avro::encode(e, v.tableNames);
592  ::avro::encode(e, v.inputColumnNames);
593  ::avro::encode(e, v.outputColumnNames);
594  ::avro::encode(e, v.options);
595  }
596 
597  static void decode(Decoder& d, gpudb::CreateUnionRequest& v)
598  {
599  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
600  {
601  const std::vector<size_t> fo = rd->fieldOrder();
602 
603  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
604  {
605  switch (*it)
606  {
607  case 0:
608  ::avro::decode(d, v.tableName);
609  break;
610 
611  case 1:
612  ::avro::decode(d, v.tableNames);
613  break;
614 
615  case 2:
616  ::avro::decode(d, v.inputColumnNames);
617  break;
618 
619  case 3:
620  ::avro::decode(d, v.outputColumnNames);
621  break;
622 
623  case 4:
624  ::avro::decode(d, v.options);
625  break;
626 
627  default:
628  break;
629  }
630  }
631  }
632  else
633  {
634  ::avro::decode(d, v.tableName);
635  ::avro::decode(d, v.tableNames);
636  ::avro::decode(d, v.inputColumnNames);
637  ::avro::decode(d, v.outputColumnNames);
638  ::avro::decode(d, v.options);
639  }
640  }
641  };
642 } // end namespace avro
643 
644 namespace gpudb
645 {
652  {
657  tableName(std::string()),
658  info(std::map<std::string, std::string>())
659  {
660  }
661 
665  std::string tableName;
666 
678  std::map<std::string, std::string> info;
679  };
680 } // end namespace gpudb
681 
682 namespace avro
683 {
684  template<> struct codec_traits<gpudb::CreateUnionResponse>
685  {
686  static void encode(Encoder& e, const gpudb::CreateUnionResponse& v)
687  {
688  ::avro::encode(e, v.tableName);
689  ::avro::encode(e, v.info);
690  }
691 
692  static void decode(Decoder& d, gpudb::CreateUnionResponse& v)
693  {
694  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
695  {
696  const std::vector<size_t> fo = rd->fieldOrder();
697 
698  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
699  {
700  switch (*it)
701  {
702  case 0:
703  ::avro::decode(d, v.tableName);
704  break;
705 
706  case 1:
707  ::avro::decode(d, v.info);
708  break;
709 
710  default:
711  break;
712  }
713  }
714  }
715  else
716  {
717  ::avro::decode(d, v.tableName);
718  ::avro::decode(d, v.info);
719  }
720  }
721  };
722 } // end namespace avro
723 
724 #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:375
CreateUnionResponse()
Constructs a CreateUnionResponse object with default parameters.
Definition: create_union.h:656
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:385
std::map< std::string, std::string > options
Optional parameters.
Definition: create_union.h:580
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:349
std::map< std::string, std::string > info
Additional information.
Definition: create_union.h:678
A set of results returned by GPUdb::createUnion.
Definition: create_union.h:651
std::string tableName
Value of tableName.
Definition: create_union.h:665
std::vector< std::vector< std::string > > inputColumnNames
The list of columns from each of the corresponding input tables.
Definition: create_union.h:380
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:366