GPUdb C++ API  Version 7.2.3.0
alter_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 __ALTER_TABLE_H__
7 #define __ALTER_TABLE_H__
8 
9 namespace gpudb
10 {
65  {
70  tableName(std::string()),
71  action(std::string()),
72  value(std::string()),
73  options(std::map<std::string, std::string>())
74  {
75  }
76 
613  AlterTableRequest(const std::string& tableName_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
614  tableName( tableName_ ),
615  action( action_ ),
616  value( value_ ),
617  options( options_ )
618  {
619  }
620 
628  std::string tableName;
629 
868  std::string action;
869 
884  std::string value;
885 
1005  std::map<std::string, std::string> options;
1006  };
1007 } // end namespace gpudb
1008 
1009 namespace avro
1010 {
1011  template<> struct codec_traits<gpudb::AlterTableRequest>
1012  {
1013  static void encode(Encoder& e, const gpudb::AlterTableRequest& v)
1014  {
1015  ::avro::encode(e, v.tableName);
1016  ::avro::encode(e, v.action);
1017  ::avro::encode(e, v.value);
1018  ::avro::encode(e, v.options);
1019  }
1020 
1021  static void decode(Decoder& d, gpudb::AlterTableRequest& v)
1022  {
1023  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1024  {
1025  const std::vector<size_t> fo = rd->fieldOrder();
1026 
1027  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1028  {
1029  switch (*it)
1030  {
1031  case 0:
1032  ::avro::decode(d, v.tableName);
1033  break;
1034 
1035  case 1:
1036  ::avro::decode(d, v.action);
1037  break;
1038 
1039  case 2:
1040  ::avro::decode(d, v.value);
1041  break;
1042 
1043  case 3:
1044  ::avro::decode(d, v.options);
1045  break;
1046 
1047  default:
1048  break;
1049  }
1050  }
1051  }
1052  else
1053  {
1054  ::avro::decode(d, v.tableName);
1055  ::avro::decode(d, v.action);
1056  ::avro::decode(d, v.value);
1057  ::avro::decode(d, v.options);
1058  }
1059  }
1060  };
1061 } // end namespace avro
1062 
1063 namespace gpudb
1064 {
1070  {
1075  tableName(std::string()),
1076  action(std::string()),
1077  value(std::string()),
1078  typeId(std::string()),
1079  typeDefinition(std::string()),
1080  properties(std::map<std::string, std::vector<std::string> >()),
1081  label(std::string()),
1082  info(std::map<std::string, std::string>())
1083  {
1084  }
1085 
1089  std::string tableName;
1090 
1094  std::string action;
1095 
1099  std::string value;
1100 
1105  std::string typeId;
1106 
1111  std::string typeDefinition;
1112 
1117  std::map<std::string, std::vector<std::string> > properties;
1118 
1123  std::string label;
1124 
1128  std::map<std::string, std::string> info;
1129  };
1130 } // end namespace gpudb
1131 
1132 namespace avro
1133 {
1134  template<> struct codec_traits<gpudb::AlterTableResponse>
1135  {
1136  static void encode(Encoder& e, const gpudb::AlterTableResponse& v)
1137  {
1138  ::avro::encode(e, v.tableName);
1139  ::avro::encode(e, v.action);
1140  ::avro::encode(e, v.value);
1141  ::avro::encode(e, v.typeId);
1142  ::avro::encode(e, v.typeDefinition);
1143  ::avro::encode(e, v.properties);
1144  ::avro::encode(e, v.label);
1145  ::avro::encode(e, v.info);
1146  }
1147 
1148  static void decode(Decoder& d, gpudb::AlterTableResponse& v)
1149  {
1150  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1151  {
1152  const std::vector<size_t> fo = rd->fieldOrder();
1153 
1154  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1155  {
1156  switch (*it)
1157  {
1158  case 0:
1159  ::avro::decode(d, v.tableName);
1160  break;
1161 
1162  case 1:
1163  ::avro::decode(d, v.action);
1164  break;
1165 
1166  case 2:
1167  ::avro::decode(d, v.value);
1168  break;
1169 
1170  case 3:
1171  ::avro::decode(d, v.typeId);
1172  break;
1173 
1174  case 4:
1175  ::avro::decode(d, v.typeDefinition);
1176  break;
1177 
1178  case 5:
1179  ::avro::decode(d, v.properties);
1180  break;
1181 
1182  case 6:
1183  ::avro::decode(d, v.label);
1184  break;
1185 
1186  case 7:
1187  ::avro::decode(d, v.info);
1188  break;
1189 
1190  default:
1191  break;
1192  }
1193  }
1194  }
1195  else
1196  {
1197  ::avro::decode(d, v.tableName);
1198  ::avro::decode(d, v.action);
1199  ::avro::decode(d, v.value);
1200  ::avro::decode(d, v.typeId);
1201  ::avro::decode(d, v.typeDefinition);
1202  ::avro::decode(d, v.properties);
1203  ::avro::decode(d, v.label);
1204  ::avro::decode(d, v.info);
1205  }
1206  }
1207  };
1208 } // end namespace avro
1209 
1210 #endif // __ALTER_TABLE_H__
A set of results returned by GPUdb::alterTable.
Definition: alter_table.h:1069
AlterTableResponse()
Constructs an AlterTableResponse object with default parameters.
Definition: alter_table.h:1074
std::map< std::string, std::string > options
Optional parameters.
Definition: alter_table.h:1005
std::string label
return the type label (when changing a table, a new type may be created)
Definition: alter_table.h:1123
std::string action
Modification operation to be applied.
Definition: alter_table.h:868
std::string tableName
Table on which the operation will be performed, in [ schema_name.
Definition: alter_table.h:628
std::map< std::string, std::vector< std::string > > properties
return the type properties (when changing a table, a new type may be created)
Definition: alter_table.h:1117
std::map< std::string, std::string > info
Additional information.
Definition: alter_table.h:1128
A set of parameters for GPUdb::alterTable.
Definition: alter_table.h:64
std::string typeId
return the type_id (when changing a table, a new type may be created)
Definition: alter_table.h:1105
std::string value
The value of the modification that was performed.
Definition: alter_table.h:1099
AlterTableRequest()
Constructs an AlterTableRequest object with default parameters.
Definition: alter_table.h:69
std::string value
The value of the modification, depending on action.
Definition: alter_table.h:884
std::string tableName
Table on which the operation was performed.
Definition: alter_table.h:1089
std::string action
Modification operation that was performed.
Definition: alter_table.h:1094
std::string typeDefinition
return the type_definition (when changing a table, a new type may be created)
Definition: alter_table.h:1111
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:613