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