GPUdb C++ API  Version 7.2.2.4
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 
283  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_):
284  tableName( tableName_ ),
285  tableNames( tableNames_ ),
286  inputColumnNames( inputColumnNames_ ),
287  outputColumnNames( outputColumnNames_ ),
288  options( options_ )
289  {
290  }
291 
300  std::string tableName;
301 
309  std::vector<std::string> tableNames;
310 
314  std::vector<std::vector<std::string> > inputColumnNames;
315 
319  std::vector<std::string> outputColumnNames;
320 
454  std::map<std::string, std::string> options;
455  };
456 } // end namespace gpudb
457 
458 namespace avro
459 {
460  template<> struct codec_traits<gpudb::CreateUnionRequest>
461  {
462  static void encode(Encoder& e, const gpudb::CreateUnionRequest& v)
463  {
464  ::avro::encode(e, v.tableName);
465  ::avro::encode(e, v.tableNames);
466  ::avro::encode(e, v.inputColumnNames);
467  ::avro::encode(e, v.outputColumnNames);
468  ::avro::encode(e, v.options);
469  }
470 
471  static void decode(Decoder& d, gpudb::CreateUnionRequest& v)
472  {
473  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
474  {
475  const std::vector<size_t> fo = rd->fieldOrder();
476 
477  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
478  {
479  switch (*it)
480  {
481  case 0:
482  ::avro::decode(d, v.tableName);
483  break;
484 
485  case 1:
486  ::avro::decode(d, v.tableNames);
487  break;
488 
489  case 2:
490  ::avro::decode(d, v.inputColumnNames);
491  break;
492 
493  case 3:
494  ::avro::decode(d, v.outputColumnNames);
495  break;
496 
497  case 4:
498  ::avro::decode(d, v.options);
499  break;
500 
501  default:
502  break;
503  }
504  }
505  }
506  else
507  {
508  ::avro::decode(d, v.tableName);
509  ::avro::decode(d, v.tableNames);
510  ::avro::decode(d, v.inputColumnNames);
511  ::avro::decode(d, v.outputColumnNames);
512  ::avro::decode(d, v.options);
513  }
514  }
515  };
516 } // end namespace avro
517 
518 namespace gpudb
519 {
526  {
531  tableName(std::string()),
532  info(std::map<std::string, std::string>())
533  {
534  }
535 
539  std::string tableName;
540 
552  std::map<std::string, std::string> info;
553  };
554 } // end namespace gpudb
555 
556 namespace avro
557 {
558  template<> struct codec_traits<gpudb::CreateUnionResponse>
559  {
560  static void encode(Encoder& e, const gpudb::CreateUnionResponse& v)
561  {
562  ::avro::encode(e, v.tableName);
563  ::avro::encode(e, v.info);
564  }
565 
566  static void decode(Decoder& d, gpudb::CreateUnionResponse& v)
567  {
568  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
569  {
570  const std::vector<size_t> fo = rd->fieldOrder();
571 
572  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
573  {
574  switch (*it)
575  {
576  case 0:
577  ::avro::decode(d, v.tableName);
578  break;
579 
580  case 1:
581  ::avro::decode(d, v.info);
582  break;
583 
584  default:
585  break;
586  }
587  }
588  }
589  else
590  {
591  ::avro::decode(d, v.tableName);
592  ::avro::decode(d, v.info);
593  }
594  }
595  };
596 } // end namespace avro
597 
598 #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:309
CreateUnionResponse()
Constructs a CreateUnionResponse object with default parameters.
Definition: create_union.h:530
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:319
std::map< std::string, std::string > options
Optional parameters.
Definition: create_union.h:454
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:283
std::map< std::string, std::string > info
Additional information.
Definition: create_union.h:552
A set of results returned by GPUdb::createUnion.
Definition: create_union.h:525
std::string tableName
Value of tableName.
Definition: create_union.h:539
std::vector< std::vector< std::string > > inputColumnNames
The list of columns from each of the corresponding input tables.
Definition: create_union.h:314
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:300