GPUdb C++ API  Version 7.2.3.0
create_table.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_TABLE_H__
7 #define __CREATE_TABLE_H__
8 
9 namespace gpudb
10 {
60  {
65  tableName(std::string()),
66  typeId(std::string()),
67  options(std::map<std::string, std::string>())
68  {
69  }
70 
423  CreateTableRequest(const std::string& tableName_, const std::string& typeId_, const std::map<std::string, std::string>& options_):
424  tableName( tableName_ ),
425  typeId( typeId_ ),
426  options( options_ )
427  {
428  }
429 
441  std::string tableName;
442 
449  std::string typeId;
450 
685  std::map<std::string, std::string> options;
686  };
687 } // end namespace gpudb
688 
689 namespace avro
690 {
691  template<> struct codec_traits<gpudb::CreateTableRequest>
692  {
693  static void encode(Encoder& e, const gpudb::CreateTableRequest& v)
694  {
695  ::avro::encode(e, v.tableName);
696  ::avro::encode(e, v.typeId);
697  ::avro::encode(e, v.options);
698  }
699 
700  static void decode(Decoder& d, gpudb::CreateTableRequest& v)
701  {
702  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
703  {
704  const std::vector<size_t> fo = rd->fieldOrder();
705 
706  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
707  {
708  switch (*it)
709  {
710  case 0:
711  ::avro::decode(d, v.tableName);
712  break;
713 
714  case 1:
715  ::avro::decode(d, v.typeId);
716  break;
717 
718  case 2:
719  ::avro::decode(d, v.options);
720  break;
721 
722  default:
723  break;
724  }
725  }
726  }
727  else
728  {
729  ::avro::decode(d, v.tableName);
730  ::avro::decode(d, v.typeId);
731  ::avro::decode(d, v.options);
732  }
733  }
734  };
735 } // end namespace avro
736 
737 namespace gpudb
738 {
745  {
750  tableName(std::string()),
751  typeId(std::string()),
752  isCollection(bool()),
753  info(std::map<std::string, std::string>())
754  {
755  }
756 
760  std::string tableName;
761 
765  std::string typeId;
766 
772 
782  std::map<std::string, std::string> info;
783  };
784 } // end namespace gpudb
785 
786 namespace avro
787 {
788  template<> struct codec_traits<gpudb::CreateTableResponse>
789  {
790  static void encode(Encoder& e, const gpudb::CreateTableResponse& v)
791  {
792  ::avro::encode(e, v.tableName);
793  ::avro::encode(e, v.typeId);
794  ::avro::encode(e, v.isCollection);
795  ::avro::encode(e, v.info);
796  }
797 
798  static void decode(Decoder& d, gpudb::CreateTableResponse& v)
799  {
800  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
801  {
802  const std::vector<size_t> fo = rd->fieldOrder();
803 
804  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
805  {
806  switch (*it)
807  {
808  case 0:
809  ::avro::decode(d, v.tableName);
810  break;
811 
812  case 1:
813  ::avro::decode(d, v.typeId);
814  break;
815 
816  case 2:
817  ::avro::decode(d, v.isCollection);
818  break;
819 
820  case 3:
821  ::avro::decode(d, v.info);
822  break;
823 
824  default:
825  break;
826  }
827  }
828  }
829  else
830  {
831  ::avro::decode(d, v.tableName);
832  ::avro::decode(d, v.typeId);
833  ::avro::decode(d, v.isCollection);
834  ::avro::decode(d, v.info);
835  }
836  }
837  };
838 } // end namespace avro
839 
840 #endif // __CREATE_TABLE_H__
std::string tableName
Name of the table to be created, in [ schema_name. ]table_name format, using standard name resolution...
Definition: create_table.h:441
std::string typeId
Value of typeId.
Definition: create_table.h:765
std::string tableName
Value of tableName.
Definition: create_table.h:760
std::map< std::string, std::string > info
Additional information.
Definition: create_table.h:782
std::string typeId
The type for the table, specified as either an existing table's numerical type ID (as returned by GPU...
Definition: create_table.h:449
CreateTableRequest()
Constructs a CreateTableRequest object with default parameters.
Definition: create_table.h:64
bool isCollection
[DEPRECATED–this will always return false] Indicates if the created entity is a schema.
Definition: create_table.h:771
A set of parameters for GPUdb::createTable.
Definition: create_table.h:59
CreateTableRequest(const std::string &tableName_, const std::string &typeId_, const std::map< std::string, std::string > &options_)
Constructs a CreateTableRequest object with the specified parameters.
Definition: create_table.h:423
CreateTableResponse()
Constructs a CreateTableResponse object with default parameters.
Definition: create_table.h:749
A set of results returned by GPUdb::createTable.
Definition: create_table.h:744
std::map< std::string, std::string > options
Optional parameters.
Definition: create_table.h:685