GPUdb C++ API  Version 6.1.0.0
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 
26  {
27 
33  tableName(std::string()),
34  tableNames(std::vector<std::string>()),
35  inputColumnNames(std::vector<std::vector<std::string> >()),
36  outputColumnNames(std::vector<std::string>()),
37  options(std::map<std::string, std::string>())
38  {
39  }
40 
130  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_):
131  tableName( tableName_ ),
132  tableNames( tableNames_ ),
133  inputColumnNames( inputColumnNames_ ),
134  outputColumnNames( outputColumnNames_ ),
135  options( options_ )
136  {
137  }
138 
139  std::string tableName;
140  std::vector<std::string> tableNames;
141  std::vector<std::vector<std::string> > inputColumnNames;
142  std::vector<std::string> outputColumnNames;
143  std::map<std::string, std::string> options;
144  };
145 }
146 
147 namespace avro
148 {
149  template<> struct codec_traits<gpudb::CreateUnionRequest>
150  {
151  static void encode(Encoder& e, const gpudb::CreateUnionRequest& v)
152  {
153  ::avro::encode(e, v.tableName);
154  ::avro::encode(e, v.tableNames);
155  ::avro::encode(e, v.inputColumnNames);
156  ::avro::encode(e, v.outputColumnNames);
157  ::avro::encode(e, v.options);
158  }
159 
160  static void decode(Decoder& d, gpudb::CreateUnionRequest& v)
161  {
162  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
163  {
164  const std::vector<size_t> fo = rd->fieldOrder();
165 
166  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
167  {
168  switch (*it)
169  {
170  case 0:
171  ::avro::decode(d, v.tableName);
172  break;
173 
174  case 1:
175  ::avro::decode(d, v.tableNames);
176  break;
177 
178  case 2:
179  ::avro::decode(d, v.inputColumnNames);
180  break;
181 
182  case 3:
183  ::avro::decode(d, v.outputColumnNames);
184  break;
185 
186  case 4:
187  ::avro::decode(d, v.options);
188  break;
189 
190  default:
191  break;
192  }
193  }
194  }
195  else
196  {
197  ::avro::decode(d, v.tableName);
198  ::avro::decode(d, v.tableNames);
199  ::avro::decode(d, v.inputColumnNames);
200  ::avro::decode(d, v.outputColumnNames);
201  ::avro::decode(d, v.options);
202  }
203  }
204  };
205 }
206 
207 namespace gpudb
208 {
209 
224  {
225 
231  tableName(std::string())
232  {
233  }
234 
235  std::string tableName;
236  };
237 }
238 
239 namespace avro
240 {
241  template<> struct codec_traits<gpudb::CreateUnionResponse>
242  {
243  static void encode(Encoder& e, const gpudb::CreateUnionResponse& v)
244  {
245  ::avro::encode(e, v.tableName);
246  }
247 
248  static void decode(Decoder& d, gpudb::CreateUnionResponse& v)
249  {
250  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
251  {
252  const std::vector<size_t> fo = rd->fieldOrder();
253 
254  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
255  {
256  switch (*it)
257  {
258  case 0:
259  ::avro::decode(d, v.tableName);
260  break;
261 
262  default:
263  break;
264  }
265  }
266  }
267  else
268  {
269  ::avro::decode(d, v.tableName);
270  }
271  }
272  };
273 }
274 
275 #endif
std::vector< std::string > tableNames
Definition: create_union.h:140
CreateUnionResponse()
Constructs a CreateUnionResponse object with default parameter values.
Definition: create_union.h:230
A set of input parameters for createUnion(const CreateUnionRequest&) const.
Definition: create_union.h:25
std::vector< std::string > outputColumnNames
Definition: create_union.h:142
std::map< std::string, std::string > options
Definition: create_union.h:143
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:130
A set of output parameters for createUnion(const CreateUnionRequest&) const.
Definition: create_union.h:223
std::vector< std::vector< std::string > > inputColumnNames
Definition: create_union.h:141
CreateUnionRequest()
Constructs a CreateUnionRequest object with default parameter values.
Definition: create_union.h:32