GPUdb C++ API  Version 7.2.2.4
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 
637  AlterTableRequest(const std::string& tableName_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
638  tableName( tableName_ ),
639  action( action_ ),
640  value( value_ ),
641  options( options_ )
642  {
643  }
644 
652  std::string tableName;
653 
895  std::string action;
896 
911  std::string value;
912 
1044  std::map<std::string, std::string> options;
1045  };
1046 } // end namespace gpudb
1047 
1048 namespace avro
1049 {
1050  template<> struct codec_traits<gpudb::AlterTableRequest>
1051  {
1052  static void encode(Encoder& e, const gpudb::AlterTableRequest& v)
1053  {
1054  ::avro::encode(e, v.tableName);
1055  ::avro::encode(e, v.action);
1056  ::avro::encode(e, v.value);
1057  ::avro::encode(e, v.options);
1058  }
1059 
1060  static void decode(Decoder& d, gpudb::AlterTableRequest& v)
1061  {
1062  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1063  {
1064  const std::vector<size_t> fo = rd->fieldOrder();
1065 
1066  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1067  {
1068  switch (*it)
1069  {
1070  case 0:
1071  ::avro::decode(d, v.tableName);
1072  break;
1073 
1074  case 1:
1075  ::avro::decode(d, v.action);
1076  break;
1077 
1078  case 2:
1079  ::avro::decode(d, v.value);
1080  break;
1081 
1082  case 3:
1083  ::avro::decode(d, v.options);
1084  break;
1085 
1086  default:
1087  break;
1088  }
1089  }
1090  }
1091  else
1092  {
1093  ::avro::decode(d, v.tableName);
1094  ::avro::decode(d, v.action);
1095  ::avro::decode(d, v.value);
1096  ::avro::decode(d, v.options);
1097  }
1098  }
1099  };
1100 } // end namespace avro
1101 
1102 namespace gpudb
1103 {
1109  {
1114  tableName(std::string()),
1115  action(std::string()),
1116  value(std::string()),
1117  typeId(std::string()),
1118  typeDefinition(std::string()),
1119  properties(std::map<std::string, std::vector<std::string> >()),
1120  label(std::string()),
1121  info(std::map<std::string, std::string>())
1122  {
1123  }
1124 
1128  std::string tableName;
1129 
1133  std::string action;
1134 
1138  std::string value;
1139 
1144  std::string typeId;
1145 
1150  std::string typeDefinition;
1151 
1156  std::map<std::string, std::vector<std::string> > properties;
1157 
1162  std::string label;
1163 
1167  std::map<std::string, std::string> info;
1168  };
1169 } // end namespace gpudb
1170 
1171 namespace avro
1172 {
1173  template<> struct codec_traits<gpudb::AlterTableResponse>
1174  {
1175  static void encode(Encoder& e, const gpudb::AlterTableResponse& v)
1176  {
1177  ::avro::encode(e, v.tableName);
1178  ::avro::encode(e, v.action);
1179  ::avro::encode(e, v.value);
1180  ::avro::encode(e, v.typeId);
1181  ::avro::encode(e, v.typeDefinition);
1182  ::avro::encode(e, v.properties);
1183  ::avro::encode(e, v.label);
1184  ::avro::encode(e, v.info);
1185  }
1186 
1187  static void decode(Decoder& d, gpudb::AlterTableResponse& v)
1188  {
1189  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1190  {
1191  const std::vector<size_t> fo = rd->fieldOrder();
1192 
1193  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1194  {
1195  switch (*it)
1196  {
1197  case 0:
1198  ::avro::decode(d, v.tableName);
1199  break;
1200 
1201  case 1:
1202  ::avro::decode(d, v.action);
1203  break;
1204 
1205  case 2:
1206  ::avro::decode(d, v.value);
1207  break;
1208 
1209  case 3:
1210  ::avro::decode(d, v.typeId);
1211  break;
1212 
1213  case 4:
1214  ::avro::decode(d, v.typeDefinition);
1215  break;
1216 
1217  case 5:
1218  ::avro::decode(d, v.properties);
1219  break;
1220 
1221  case 6:
1222  ::avro::decode(d, v.label);
1223  break;
1224 
1225  case 7:
1226  ::avro::decode(d, v.info);
1227  break;
1228 
1229  default:
1230  break;
1231  }
1232  }
1233  }
1234  else
1235  {
1236  ::avro::decode(d, v.tableName);
1237  ::avro::decode(d, v.action);
1238  ::avro::decode(d, v.value);
1239  ::avro::decode(d, v.typeId);
1240  ::avro::decode(d, v.typeDefinition);
1241  ::avro::decode(d, v.properties);
1242  ::avro::decode(d, v.label);
1243  ::avro::decode(d, v.info);
1244  }
1245  }
1246  };
1247 } // end namespace avro
1248 
1249 #endif // __ALTER_TABLE_H__
A set of results returned by GPUdb::alterTable.
Definition: alter_table.h:1108
AlterTableResponse()
Constructs an AlterTableResponse object with default parameters.
Definition: alter_table.h:1113
std::map< std::string, std::string > options
Optional parameters.
Definition: alter_table.h:1044
std::string label
return the type label (when changing a table, a new type may be created)
Definition: alter_table.h:1162
std::string action
Modification operation to be applied.
Definition: alter_table.h:895
std::string tableName
Table on which the operation will be performed, in [ schema_name.
Definition: alter_table.h:652
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:1156
std::map< std::string, std::string > info
Additional information.
Definition: alter_table.h:1167
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:1144
std::string value
The value of the modification that was performed.
Definition: alter_table.h:1138
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:911
std::string tableName
Table on which the operation was performed.
Definition: alter_table.h:1128
std::string action
Modification operation that was performed.
Definition: alter_table.h:1133
std::string typeDefinition
return the type_definition (when changing a table, a new type may be created)
Definition: alter_table.h:1150
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:637