GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_union.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_UNION_H__
7 #define __CREATE_UNION_H__
8 
9 namespace gpudb
10 {
11 
48  {
49 
55  tableName(std::string()),
56  tableNames(std::vector<std::string>()),
57  inputColumnNames(std::vector<std::vector<std::string> >()),
58  outputColumnNames(std::vector<std::string>()),
59  options(std::map<std::string, std::string>())
60  {
61  }
62 
199  CreateUnionRequest(const std::string& tableName_, const std::vector<std::string>& tableNames_, const std::vector<std::vector<std::string> >& inputColumnNames_, const std::vector<std::string>& outputColumnNames_, const std::map<std::string, std::string>& options_):
200  tableName( tableName_ ),
201  tableNames( tableNames_ ),
202  inputColumnNames( inputColumnNames_ ),
203  outputColumnNames( outputColumnNames_ ),
204  options( options_ )
205  {
206  }
207 
208  std::string tableName;
209  std::vector<std::string> tableNames;
210  std::vector<std::vector<std::string> > inputColumnNames;
211  std::vector<std::string> outputColumnNames;
212  std::map<std::string, std::string> options;
213  };
214 }
215 
216 namespace avro
217 {
218  template<> struct codec_traits<gpudb::CreateUnionRequest>
219  {
220  static void encode(Encoder& e, const gpudb::CreateUnionRequest& v)
221  {
222  ::avro::encode(e, v.tableName);
223  ::avro::encode(e, v.tableNames);
224  ::avro::encode(e, v.inputColumnNames);
225  ::avro::encode(e, v.outputColumnNames);
226  ::avro::encode(e, v.options);
227  }
228 
229  static void decode(Decoder& d, gpudb::CreateUnionRequest& v)
230  {
231  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
232  {
233  const std::vector<size_t> fo = rd->fieldOrder();
234 
235  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
236  {
237  switch (*it)
238  {
239  case 0:
240  ::avro::decode(d, v.tableName);
241  break;
242 
243  case 1:
244  ::avro::decode(d, v.tableNames);
245  break;
246 
247  case 2:
248  ::avro::decode(d, v.inputColumnNames);
249  break;
250 
251  case 3:
252  ::avro::decode(d, v.outputColumnNames);
253  break;
254 
255  case 4:
256  ::avro::decode(d, v.options);
257  break;
258 
259  default:
260  break;
261  }
262  }
263  }
264  else
265  {
266  ::avro::decode(d, v.tableName);
267  ::avro::decode(d, v.tableNames);
268  ::avro::decode(d, v.inputColumnNames);
269  ::avro::decode(d, v.outputColumnNames);
270  ::avro::decode(d, v.options);
271  }
272  }
273  };
274 }
275 
276 namespace gpudb
277 {
278 
315  {
316 
322  tableName(std::string()),
323  info(std::map<std::string, std::string>())
324  {
325  }
326 
327  std::string tableName;
328  std::map<std::string, std::string> info;
329  };
330 }
331 
332 namespace avro
333 {
334  template<> struct codec_traits<gpudb::CreateUnionResponse>
335  {
336  static void encode(Encoder& e, const gpudb::CreateUnionResponse& v)
337  {
338  ::avro::encode(e, v.tableName);
339  ::avro::encode(e, v.info);
340  }
341 
342  static void decode(Decoder& d, gpudb::CreateUnionResponse& v)
343  {
344  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
345  {
346  const std::vector<size_t> fo = rd->fieldOrder();
347 
348  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
349  {
350  switch (*it)
351  {
352  case 0:
353  ::avro::decode(d, v.tableName);
354  break;
355 
356  case 1:
357  ::avro::decode(d, v.info);
358  break;
359 
360  default:
361  break;
362  }
363  }
364  }
365  else
366  {
367  ::avro::decode(d, v.tableName);
368  ::avro::decode(d, v.info);
369  }
370  }
371  };
372 }
373 
374 #endif
std::vector< std::string > tableNames
Definition: create_union.h:209
CreateUnionResponse()
Constructs a CreateUnionResponse object with default parameter values.
Definition: create_union.h:321
A set of input parameters for const.
Definition: create_union.h:47
std::vector< std::string > outputColumnNames
Definition: create_union.h:211
std::map< std::string, std::string > options
Definition: create_union.h:212
CreateUnionRequest(const std::string &tableName_, const std::vector< std::string > &tableNames_, const std::vector< std::vector< std::string > > &inputColumnNames_, const std::vector< std::string > &outputColumnNames_, const std::map< std::string, std::string > &options_)
Constructs a CreateUnionRequest object with the specified parameters.
Definition: create_union.h:199
std::map< std::string, std::string > info
Definition: create_union.h:328
A set of output parameters for const.
Definition: create_union.h:314
std::vector< std::vector< std::string > > inputColumnNames
Definition: create_union.h:210
CreateUnionRequest()
Constructs a CreateUnionRequest object with default parameter values.
Definition: create_union.h:54