GPUdb C++ API  Version 6.1.0.0
alter_table.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __ALTER_TABLE_H__
7 #define __ALTER_TABLE_H__
8 
9 namespace gpudb
10 {
11 
54  {
55 
61  tableName(std::string()),
62  action(std::string()),
63  value(std::string()),
64  options(std::map<std::string, std::string>())
65  {
66  }
67 
212  AlterTableRequest(const std::string& tableName_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
213  tableName( tableName_ ),
214  action( action_ ),
215  value( value_ ),
216  options( options_ )
217  {
218  }
219 
220  std::string tableName;
221  std::string action;
222  std::string value;
223  std::map<std::string, std::string> options;
224  };
225 }
226 
227 namespace avro
228 {
229  template<> struct codec_traits<gpudb::AlterTableRequest>
230  {
231  static void encode(Encoder& e, const gpudb::AlterTableRequest& v)
232  {
233  ::avro::encode(e, v.tableName);
234  ::avro::encode(e, v.action);
235  ::avro::encode(e, v.value);
236  ::avro::encode(e, v.options);
237  }
238 
239  static void decode(Decoder& d, gpudb::AlterTableRequest& v)
240  {
241  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
242  {
243  const std::vector<size_t> fo = rd->fieldOrder();
244 
245  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
246  {
247  switch (*it)
248  {
249  case 0:
250  ::avro::decode(d, v.tableName);
251  break;
252 
253  case 1:
254  ::avro::decode(d, v.action);
255  break;
256 
257  case 2:
258  ::avro::decode(d, v.value);
259  break;
260 
261  case 3:
262  ::avro::decode(d, v.options);
263  break;
264 
265  default:
266  break;
267  }
268  }
269  }
270  else
271  {
272  ::avro::decode(d, v.tableName);
273  ::avro::decode(d, v.action);
274  ::avro::decode(d, v.value);
275  ::avro::decode(d, v.options);
276  }
277  }
278  };
279 }
280 
281 namespace gpudb
282 {
283 
326  {
327 
333  tableName(std::string()),
334  action(std::string()),
335  value(std::string()),
336  typeId(std::string()),
337  typeDefinition(std::string()),
338  properties(std::map<std::string, std::vector<std::string> >()),
339  label(std::string())
340  {
341  }
342 
343  std::string tableName;
344  std::string action;
345  std::string value;
346  std::string typeId;
347  std::string typeDefinition;
348  std::map<std::string, std::vector<std::string> > properties;
349  std::string label;
350  };
351 }
352 
353 namespace avro
354 {
355  template<> struct codec_traits<gpudb::AlterTableResponse>
356  {
357  static void encode(Encoder& e, const gpudb::AlterTableResponse& v)
358  {
359  ::avro::encode(e, v.tableName);
360  ::avro::encode(e, v.action);
361  ::avro::encode(e, v.value);
362  ::avro::encode(e, v.typeId);
363  ::avro::encode(e, v.typeDefinition);
364  ::avro::encode(e, v.properties);
365  ::avro::encode(e, v.label);
366  }
367 
368  static void decode(Decoder& d, gpudb::AlterTableResponse& v)
369  {
370  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
371  {
372  const std::vector<size_t> fo = rd->fieldOrder();
373 
374  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
375  {
376  switch (*it)
377  {
378  case 0:
379  ::avro::decode(d, v.tableName);
380  break;
381 
382  case 1:
383  ::avro::decode(d, v.action);
384  break;
385 
386  case 2:
387  ::avro::decode(d, v.value);
388  break;
389 
390  case 3:
391  ::avro::decode(d, v.typeId);
392  break;
393 
394  case 4:
395  ::avro::decode(d, v.typeDefinition);
396  break;
397 
398  case 5:
399  ::avro::decode(d, v.properties);
400  break;
401 
402  case 6:
403  ::avro::decode(d, v.label);
404  break;
405 
406  default:
407  break;
408  }
409  }
410  }
411  else
412  {
413  ::avro::decode(d, v.tableName);
414  ::avro::decode(d, v.action);
415  ::avro::decode(d, v.value);
416  ::avro::decode(d, v.typeId);
417  ::avro::decode(d, v.typeDefinition);
418  ::avro::decode(d, v.properties);
419  ::avro::decode(d, v.label);
420  }
421  }
422  };
423 }
424 
425 #endif
A set of output parameters for alterTable(const AlterTableRequest&) const.
Definition: alter_table.h:325
AlterTableResponse()
Constructs an AlterTableResponse object with default parameter values.
Definition: alter_table.h:332
std::map< std::string, std::string > options
Definition: alter_table.h:223
std::map< std::string, std::vector< std::string > > properties
Definition: alter_table.h:348
A set of input parameters for alterTable(const AlterTableRequest&) const.
Definition: alter_table.h:53
AlterTableRequest()
Constructs an AlterTableRequest object with default parameter values.
Definition: alter_table.h:60
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:212