GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
alter_table.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 __ALTER_TABLE_H__
7 #define __ALTER_TABLE_H__
8 
9 namespace gpudb
10 {
11 
71  {
72 
78  tableName(std::string()),
79  action(std::string()),
80  value(std::string()),
81  options(std::map<std::string, std::string>())
82  {
83  }
84 
440  AlterTableRequest(const std::string& tableName_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
441  tableName( tableName_ ),
442  action( action_ ),
443  value( value_ ),
444  options( options_ )
445  {
446  }
447 
448  std::string tableName;
449  std::string action;
450  std::string value;
451  std::map<std::string, std::string> options;
452  };
453 }
454 
455 namespace avro
456 {
457  template<> struct codec_traits<gpudb::AlterTableRequest>
458  {
459  static void encode(Encoder& e, const gpudb::AlterTableRequest& v)
460  {
461  ::avro::encode(e, v.tableName);
462  ::avro::encode(e, v.action);
463  ::avro::encode(e, v.value);
464  ::avro::encode(e, v.options);
465  }
466 
467  static void decode(Decoder& d, gpudb::AlterTableRequest& v)
468  {
469  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
470  {
471  const std::vector<size_t> fo = rd->fieldOrder();
472 
473  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
474  {
475  switch (*it)
476  {
477  case 0:
478  ::avro::decode(d, v.tableName);
479  break;
480 
481  case 1:
482  ::avro::decode(d, v.action);
483  break;
484 
485  case 2:
486  ::avro::decode(d, v.value);
487  break;
488 
489  case 3:
490  ::avro::decode(d, v.options);
491  break;
492 
493  default:
494  break;
495  }
496  }
497  }
498  else
499  {
500  ::avro::decode(d, v.tableName);
501  ::avro::decode(d, v.action);
502  ::avro::decode(d, v.value);
503  ::avro::decode(d, v.options);
504  }
505  }
506  };
507 }
508 
509 namespace gpudb
510 {
511 
571  {
572 
578  tableName(std::string()),
579  action(std::string()),
580  value(std::string()),
581  typeId(std::string()),
582  typeDefinition(std::string()),
583  properties(std::map<std::string, std::vector<std::string> >()),
584  label(std::string()),
585  info(std::map<std::string, std::string>())
586  {
587  }
588 
589  std::string tableName;
590  std::string action;
591  std::string value;
592  std::string typeId;
593  std::string typeDefinition;
594  std::map<std::string, std::vector<std::string> > properties;
595  std::string label;
596  std::map<std::string, std::string> info;
597  };
598 }
599 
600 namespace avro
601 {
602  template<> struct codec_traits<gpudb::AlterTableResponse>
603  {
604  static void encode(Encoder& e, const gpudb::AlterTableResponse& v)
605  {
606  ::avro::encode(e, v.tableName);
607  ::avro::encode(e, v.action);
608  ::avro::encode(e, v.value);
609  ::avro::encode(e, v.typeId);
610  ::avro::encode(e, v.typeDefinition);
611  ::avro::encode(e, v.properties);
612  ::avro::encode(e, v.label);
613  ::avro::encode(e, v.info);
614  }
615 
616  static void decode(Decoder& d, gpudb::AlterTableResponse& v)
617  {
618  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
619  {
620  const std::vector<size_t> fo = rd->fieldOrder();
621 
622  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
623  {
624  switch (*it)
625  {
626  case 0:
627  ::avro::decode(d, v.tableName);
628  break;
629 
630  case 1:
631  ::avro::decode(d, v.action);
632  break;
633 
634  case 2:
635  ::avro::decode(d, v.value);
636  break;
637 
638  case 3:
639  ::avro::decode(d, v.typeId);
640  break;
641 
642  case 4:
643  ::avro::decode(d, v.typeDefinition);
644  break;
645 
646  case 5:
647  ::avro::decode(d, v.properties);
648  break;
649 
650  case 6:
651  ::avro::decode(d, v.label);
652  break;
653 
654  case 7:
655  ::avro::decode(d, v.info);
656  break;
657 
658  default:
659  break;
660  }
661  }
662  }
663  else
664  {
665  ::avro::decode(d, v.tableName);
666  ::avro::decode(d, v.action);
667  ::avro::decode(d, v.value);
668  ::avro::decode(d, v.typeId);
669  ::avro::decode(d, v.typeDefinition);
670  ::avro::decode(d, v.properties);
671  ::avro::decode(d, v.label);
672  ::avro::decode(d, v.info);
673  }
674  }
675  };
676 }
677 
678 #endif
A set of output parameters for const.
Definition: alter_table.h:570
AlterTableResponse()
Constructs an AlterTableResponse object with default parameter values.
Definition: alter_table.h:577
std::map< std::string, std::string > options
Definition: alter_table.h:451
std::map< std::string, std::vector< std::string > > properties
Definition: alter_table.h:594
std::map< std::string, std::string > info
Definition: alter_table.h:596
A set of input parameters for const.
Definition: alter_table.h:70
AlterTableRequest()
Constructs an AlterTableRequest object with default parameter values.
Definition: alter_table.h:77
AlterTableRequest(const std::string &tableName_, const std::string &action_, const std::string &value_, const std::map< std::string, std::string > &options_)
Constructs an AlterTableRequest object with the specified parameters.
Definition: alter_table.h:440