GPUdb C++ API  Version 7.2.2.4
alter_table_columns.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_COLUMNS_H__
7 #define __ALTER_TABLE_COLUMNS_H__
8 
9 namespace gpudb
10 {
31  {
37  tableName(std::string()),
38  columnAlterations(std::vector<std::map<std::string, std::string> >()),
39  options(std::map<std::string, std::string>())
40  {
41  }
42 
66  AlterTableColumnsRequest(const std::string& tableName_, const std::vector<std::map<std::string, std::string> >& columnAlterations_, const std::map<std::string, std::string>& options_):
67  tableName( tableName_ ),
68  columnAlterations( columnAlterations_ ),
69  options( options_ )
70  {
71  }
72 
79  std::string tableName;
80 
90  std::vector<std::map<std::string, std::string> > columnAlterations;
91 
95  std::map<std::string, std::string> options;
96  };
97 } // end namespace gpudb
98 
99 namespace avro
100 {
101  template<> struct codec_traits<gpudb::AlterTableColumnsRequest>
102  {
103  static void encode(Encoder& e, const gpudb::AlterTableColumnsRequest& v)
104  {
105  ::avro::encode(e, v.tableName);
106  ::avro::encode(e, v.columnAlterations);
107  ::avro::encode(e, v.options);
108  }
109 
110  static void decode(Decoder& d, gpudb::AlterTableColumnsRequest& v)
111  {
112  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
113  {
114  const std::vector<size_t> fo = rd->fieldOrder();
115 
116  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
117  {
118  switch (*it)
119  {
120  case 0:
121  ::avro::decode(d, v.tableName);
122  break;
123 
124  case 1:
125  ::avro::decode(d, v.columnAlterations);
126  break;
127 
128  case 2:
129  ::avro::decode(d, v.options);
130  break;
131 
132  default:
133  break;
134  }
135  }
136  }
137  else
138  {
139  ::avro::decode(d, v.tableName);
140  ::avro::decode(d, v.columnAlterations);
141  ::avro::decode(d, v.options);
142  }
143  }
144  };
145 } // end namespace avro
146 
147 namespace gpudb
148 {
155  {
161  tableName(std::string()),
162  typeId(std::string()),
163  typeDefinition(std::string()),
164  properties(std::map<std::string, std::vector<std::string> >()),
165  label(std::string()),
166  columnAlterations(std::vector<std::map<std::string, std::string> >()),
167  info(std::map<std::string, std::string>())
168  {
169  }
170 
174  std::string tableName;
175 
180  std::string typeId;
181 
186  std::string typeDefinition;
187 
192  std::map<std::string, std::vector<std::string> > properties;
193 
198  std::string label;
199 
209  std::vector<std::map<std::string, std::string> > columnAlterations;
210 
214  std::map<std::string, std::string> info;
215  };
216 } // end namespace gpudb
217 
218 namespace avro
219 {
220  template<> struct codec_traits<gpudb::AlterTableColumnsResponse>
221  {
222  static void encode(Encoder& e, const gpudb::AlterTableColumnsResponse& v)
223  {
224  ::avro::encode(e, v.tableName);
225  ::avro::encode(e, v.typeId);
226  ::avro::encode(e, v.typeDefinition);
227  ::avro::encode(e, v.properties);
228  ::avro::encode(e, v.label);
229  ::avro::encode(e, v.columnAlterations);
230  ::avro::encode(e, v.info);
231  }
232 
233  static void decode(Decoder& d, gpudb::AlterTableColumnsResponse& v)
234  {
235  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
236  {
237  const std::vector<size_t> fo = rd->fieldOrder();
238 
239  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
240  {
241  switch (*it)
242  {
243  case 0:
244  ::avro::decode(d, v.tableName);
245  break;
246 
247  case 1:
248  ::avro::decode(d, v.typeId);
249  break;
250 
251  case 2:
252  ::avro::decode(d, v.typeDefinition);
253  break;
254 
255  case 3:
256  ::avro::decode(d, v.properties);
257  break;
258 
259  case 4:
260  ::avro::decode(d, v.label);
261  break;
262 
263  case 5:
264  ::avro::decode(d, v.columnAlterations);
265  break;
266 
267  case 6:
268  ::avro::decode(d, v.info);
269  break;
270 
271  default:
272  break;
273  }
274  }
275  }
276  else
277  {
278  ::avro::decode(d, v.tableName);
279  ::avro::decode(d, v.typeId);
280  ::avro::decode(d, v.typeDefinition);
281  ::avro::decode(d, v.properties);
282  ::avro::decode(d, v.label);
283  ::avro::decode(d, v.columnAlterations);
284  ::avro::decode(d, v.info);
285  }
286  }
287  };
288 } // end namespace avro
289 
290 #endif // __ALTER_TABLE_COLUMNS_H__
std::map< std::string, std::string > info
Additional information.
A set of parameters for GPUdb::alterTableColumns.
std::string typeId
return the type_id (when changing a table, a new type may be created)
std::vector< std::map< std::string, std::string > > columnAlterations
List of alter table add/delete/change column requests - all for the same table.
std::string tableName
Table on which the operation will be performed.
AlterTableColumnsRequest()
Constructs an AlterTableColumnsRequest object with default parameters.
std::string label
return the type label (when changing a table, a new type may be created)
std::string tableName
Table on which the operation was performed.
std::vector< std::map< std::string, std::string > > columnAlterations
List of alter table add/delete/change column requests - all for the same table.
A set of results returned by GPUdb::alterTableColumns.
AlterTableColumnsResponse()
Constructs an AlterTableColumnsResponse object with default parameters.
std::map< std::string, std::string > options
Optional parameters.
std::string typeDefinition
return the type_definition (when changing a table, a new type may be created)
std::map< std::string, std::vector< std::string > > properties
return the type properties (when changing a table, a new type may be created)
AlterTableColumnsRequest(const std::string &tableName_, const std::vector< std::map< std::string, std::string > > &columnAlterations_, const std::map< std::string, std::string > &options_)
Constructs an AlterTableColumnsRequest object with the specified parameters.