GPUdb C++ API  Version 7.0.19.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 
188  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_):
189  tableName( tableName_ ),
190  tableNames( tableNames_ ),
191  inputColumnNames( inputColumnNames_ ),
192  outputColumnNames( outputColumnNames_ ),
193  options( options_ )
194  {
195  }
196 
197  std::string tableName;
198  std::vector<std::string> tableNames;
199  std::vector<std::vector<std::string> > inputColumnNames;
200  std::vector<std::string> outputColumnNames;
201  std::map<std::string, std::string> options;
202  };
203 }
204 
205 namespace avro
206 {
207  template<> struct codec_traits<gpudb::CreateUnionRequest>
208  {
209  static void encode(Encoder& e, const gpudb::CreateUnionRequest& v)
210  {
211  ::avro::encode(e, v.tableName);
212  ::avro::encode(e, v.tableNames);
213  ::avro::encode(e, v.inputColumnNames);
214  ::avro::encode(e, v.outputColumnNames);
215  ::avro::encode(e, v.options);
216  }
217 
218  static void decode(Decoder& d, gpudb::CreateUnionRequest& v)
219  {
220  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
221  {
222  const std::vector<size_t> fo = rd->fieldOrder();
223 
224  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
225  {
226  switch (*it)
227  {
228  case 0:
229  ::avro::decode(d, v.tableName);
230  break;
231 
232  case 1:
233  ::avro::decode(d, v.tableNames);
234  break;
235 
236  case 2:
237  ::avro::decode(d, v.inputColumnNames);
238  break;
239 
240  case 3:
241  ::avro::decode(d, v.outputColumnNames);
242  break;
243 
244  case 4:
245  ::avro::decode(d, v.options);
246  break;
247 
248  default:
249  break;
250  }
251  }
252  }
253  else
254  {
255  ::avro::decode(d, v.tableName);
256  ::avro::decode(d, v.tableNames);
257  ::avro::decode(d, v.inputColumnNames);
258  ::avro::decode(d, v.outputColumnNames);
259  ::avro::decode(d, v.options);
260  }
261  }
262  };
263 }
264 
265 namespace gpudb
266 {
267 
304  {
305 
311  tableName(std::string()),
312  info(std::map<std::string, std::string>())
313  {
314  }
315 
316  std::string tableName;
317  std::map<std::string, std::string> info;
318  };
319 }
320 
321 namespace avro
322 {
323  template<> struct codec_traits<gpudb::CreateUnionResponse>
324  {
325  static void encode(Encoder& e, const gpudb::CreateUnionResponse& v)
326  {
327  ::avro::encode(e, v.tableName);
328  ::avro::encode(e, v.info);
329  }
330 
331  static void decode(Decoder& d, gpudb::CreateUnionResponse& v)
332  {
333  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
334  {
335  const std::vector<size_t> fo = rd->fieldOrder();
336 
337  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
338  {
339  switch (*it)
340  {
341  case 0:
342  ::avro::decode(d, v.tableName);
343  break;
344 
345  case 1:
346  ::avro::decode(d, v.info);
347  break;
348 
349  default:
350  break;
351  }
352  }
353  }
354  else
355  {
356  ::avro::decode(d, v.tableName);
357  ::avro::decode(d, v.info);
358  }
359  }
360  };
361 }
362 
363 #endif
std::vector< std::string > tableNames
Definition: create_union.h:198
CreateUnionResponse()
Constructs a CreateUnionResponse object with default parameter values.
Definition: create_union.h:310
A set of input parameters for const.
Definition: create_union.h:47
std::vector< std::string > outputColumnNames
Definition: create_union.h:200
std::map< std::string, std::string > options
Definition: create_union.h:201
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:188
std::map< std::string, std::string > info
Definition: create_union.h:317
A set of output parameters for const.
Definition: create_union.h:303
std::vector< std::vector< std::string > > inputColumnNames
Definition: create_union.h:199
CreateUnionRequest()
Constructs a CreateUnionRequest object with default parameter values.
Definition: create_union.h:54