GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_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 __CREATE_TABLE_H__
7 #define __CREATE_TABLE_H__
8 
9 namespace gpudb
10 {
11 
32  {
33 
39  tableName(std::string()),
40  typeId(std::string()),
41  options(std::map<std::string, std::string>())
42  {
43  }
44 
243  CreateTableRequest(const std::string& tableName_, const std::string& typeId_, const std::map<std::string, std::string>& options_):
244  tableName( tableName_ ),
245  typeId( typeId_ ),
246  options( options_ )
247  {
248  }
249 
250  std::string tableName;
251  std::string typeId;
252  std::map<std::string, std::string> options;
253  };
254 }
255 
256 namespace avro
257 {
258  template<> struct codec_traits<gpudb::CreateTableRequest>
259  {
260  static void encode(Encoder& e, const gpudb::CreateTableRequest& v)
261  {
262  ::avro::encode(e, v.tableName);
263  ::avro::encode(e, v.typeId);
264  ::avro::encode(e, v.options);
265  }
266 
267  static void decode(Decoder& d, gpudb::CreateTableRequest& v)
268  {
269  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
270  {
271  const std::vector<size_t> fo = rd->fieldOrder();
272 
273  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
274  {
275  switch (*it)
276  {
277  case 0:
278  ::avro::decode(d, v.tableName);
279  break;
280 
281  case 1:
282  ::avro::decode(d, v.typeId);
283  break;
284 
285  case 2:
286  ::avro::decode(d, v.options);
287  break;
288 
289  default:
290  break;
291  }
292  }
293  }
294  else
295  {
296  ::avro::decode(d, v.tableName);
297  ::avro::decode(d, v.typeId);
298  ::avro::decode(d, v.options);
299  }
300  }
301  };
302 }
303 
304 namespace gpudb
305 {
306 
327  {
328 
334  tableName(std::string()),
335  typeId(std::string()),
336  isCollection(bool()),
337  info(std::map<std::string, std::string>())
338  {
339  }
340 
341  std::string tableName;
342  std::string typeId;
344  std::map<std::string, std::string> info;
345  };
346 }
347 
348 namespace avro
349 {
350  template<> struct codec_traits<gpudb::CreateTableResponse>
351  {
352  static void encode(Encoder& e, const gpudb::CreateTableResponse& v)
353  {
354  ::avro::encode(e, v.tableName);
355  ::avro::encode(e, v.typeId);
356  ::avro::encode(e, v.isCollection);
357  ::avro::encode(e, v.info);
358  }
359 
360  static void decode(Decoder& d, gpudb::CreateTableResponse& v)
361  {
362  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
363  {
364  const std::vector<size_t> fo = rd->fieldOrder();
365 
366  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
367  {
368  switch (*it)
369  {
370  case 0:
371  ::avro::decode(d, v.tableName);
372  break;
373 
374  case 1:
375  ::avro::decode(d, v.typeId);
376  break;
377 
378  case 2:
379  ::avro::decode(d, v.isCollection);
380  break;
381 
382  case 3:
383  ::avro::decode(d, v.info);
384  break;
385 
386  default:
387  break;
388  }
389  }
390  }
391  else
392  {
393  ::avro::decode(d, v.tableName);
394  ::avro::decode(d, v.typeId);
395  ::avro::decode(d, v.isCollection);
396  ::avro::decode(d, v.info);
397  }
398  }
399  };
400 }
401 
402 #endif
std::map< std::string, std::string > info
Definition: create_table.h:344
CreateTableRequest()
Constructs a CreateTableRequest object with default parameter values.
Definition: create_table.h:38
A set of input parameters for const.
Definition: create_table.h:31
CreateTableRequest(const std::string &tableName_, const std::string &typeId_, const std::map< std::string, std::string > &options_)
Constructs a CreateTableRequest object with the specified parameters.
Definition: create_table.h:243
CreateTableResponse()
Constructs a CreateTableResponse object with default parameter values.
Definition: create_table.h:333
A set of output parameters for const.
Definition: create_table.h:326
std::map< std::string, std::string > options
Definition: create_table.h:252