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 
608  AlterTableRequest(const std::string& tableName_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
609  tableName( tableName_ ),
610  action( action_ ),
611  value( value_ ),
612  options( options_ )
613  {
614  }
615 
623  std::string tableName;
624 
860  std::string action;
861 
876  std::string value;
877 
997  std::map<std::string, std::string> options;
998  };
999 } // end namespace gpudb
1000 
1001 namespace avro
1002 {
1003  template<> struct codec_traits<gpudb::AlterTableRequest>
1004  {
1005  static void encode(Encoder& e, const gpudb::AlterTableRequest& v)
1006  {
1007  ::avro::encode(e, v.tableName);
1008  ::avro::encode(e, v.action);
1009  ::avro::encode(e, v.value);
1010  ::avro::encode(e, v.options);
1011  }
1012 
1013  static void decode(Decoder& d, gpudb::AlterTableRequest& v)
1014  {
1015  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1016  {
1017  const std::vector<size_t> fo = rd->fieldOrder();
1018 
1019  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1020  {
1021  switch (*it)
1022  {
1023  case 0:
1024  ::avro::decode(d, v.tableName);
1025  break;
1026 
1027  case 1:
1028  ::avro::decode(d, v.action);
1029  break;
1030 
1031  case 2:
1032  ::avro::decode(d, v.value);
1033  break;
1034 
1035  case 3:
1036  ::avro::decode(d, v.options);
1037  break;
1038 
1039  default:
1040  break;
1041  }
1042  }
1043  }
1044  else
1045  {
1046  ::avro::decode(d, v.tableName);
1047  ::avro::decode(d, v.action);
1048  ::avro::decode(d, v.value);
1049  ::avro::decode(d, v.options);
1050  }
1051  }
1052  };
1053 } // end namespace avro
1054 
1055 namespace gpudb
1056 {
1062  {
1067  tableName(std::string()),
1068  action(std::string()),
1069  value(std::string()),
1070  typeId(std::string()),
1071  typeDefinition(std::string()),
1072  properties(std::map<std::string, std::vector<std::string> >()),
1073  label(std::string()),
1074  info(std::map<std::string, std::string>())
1075  {
1076  }
1077 
1081  std::string tableName;
1082 
1086  std::string action;
1087 
1091  std::string value;
1092 
1097  std::string typeId;
1098 
1103  std::string typeDefinition;
1104 
1109  std::map<std::string, std::vector<std::string> > properties;
1110 
1115  std::string label;
1116 
1120  std::map<std::string, std::string> info;
1121  };
1122 } // end namespace gpudb
1123 
1124 namespace avro
1125 {
1126  template<> struct codec_traits<gpudb::AlterTableResponse>
1127  {
1128  static void encode(Encoder& e, const gpudb::AlterTableResponse& v)
1129  {
1130  ::avro::encode(e, v.tableName);
1131  ::avro::encode(e, v.action);
1132  ::avro::encode(e, v.value);
1133  ::avro::encode(e, v.typeId);
1134  ::avro::encode(e, v.typeDefinition);
1135  ::avro::encode(e, v.properties);
1136  ::avro::encode(e, v.label);
1137  ::avro::encode(e, v.info);
1138  }
1139 
1140  static void decode(Decoder& d, gpudb::AlterTableResponse& v)
1141  {
1142  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1143  {
1144  const std::vector<size_t> fo = rd->fieldOrder();
1145 
1146  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1147  {
1148  switch (*it)
1149  {
1150  case 0:
1151  ::avro::decode(d, v.tableName);
1152  break;
1153 
1154  case 1:
1155  ::avro::decode(d, v.action);
1156  break;
1157 
1158  case 2:
1159  ::avro::decode(d, v.value);
1160  break;
1161 
1162  case 3:
1163  ::avro::decode(d, v.typeId);
1164  break;
1165 
1166  case 4:
1167  ::avro::decode(d, v.typeDefinition);
1168  break;
1169 
1170  case 5:
1171  ::avro::decode(d, v.properties);
1172  break;
1173 
1174  case 6:
1175  ::avro::decode(d, v.label);
1176  break;
1177 
1178  case 7:
1179  ::avro::decode(d, v.info);
1180  break;
1181 
1182  default:
1183  break;
1184  }
1185  }
1186  }
1187  else
1188  {
1189  ::avro::decode(d, v.tableName);
1190  ::avro::decode(d, v.action);
1191  ::avro::decode(d, v.value);
1192  ::avro::decode(d, v.typeId);
1193  ::avro::decode(d, v.typeDefinition);
1194  ::avro::decode(d, v.properties);
1195  ::avro::decode(d, v.label);
1196  ::avro::decode(d, v.info);
1197  }
1198  }
1199  };
1200 } // end namespace avro
1201 
1202 #endif // __ALTER_TABLE_H__
A set of results returned by GPUdb::alterTable.
Definition: alter_table.h:1061
AlterTableResponse()
Constructs an AlterTableResponse object with default parameters.
Definition: alter_table.h:1066
std::map< std::string, std::string > options
Optional parameters.
Definition: alter_table.h:997
std::string label
return the type label (when changing a table, a new type may be created)
Definition: alter_table.h:1115
std::string action
Modification operation to be applied.
Definition: alter_table.h:860
std::string tableName
Table on which the operation will be performed, in [ schema_name.
Definition: alter_table.h:623
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:1109
std::map< std::string, std::string > info
Additional information.
Definition: alter_table.h:1120
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:1097
std::string value
The value of the modification that was performed.
Definition: alter_table.h:1091
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:876
std::string tableName
Table on which the operation was performed.
Definition: alter_table.h:1081
std::string action
Modification operation that was performed.
Definition: alter_table.h:1086
std::string typeDefinition
return the type_definition (when changing a table, a new type may be created)
Definition: alter_table.h:1103
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:608