GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
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 
121  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_):
122  tableName( tableName_ ),
123  tableNames( tableNames_ ),
124  inputColumnNames( inputColumnNames_ ),
125  outputColumnNames( outputColumnNames_ ),
126  options( options_ )
127  {
128  }
129 
130  std::string tableName;
131  std::vector<std::string> tableNames;
132  std::vector<std::vector<std::string> > inputColumnNames;
133  std::vector<std::string> outputColumnNames;
134  std::map<std::string, std::string> options;
135  };
136 }
137 
138 namespace avro
139 {
140  template<> struct codec_traits<gpudb::CreateUnionRequest>
141  {
142  static void encode(Encoder& e, const gpudb::CreateUnionRequest& v)
143  {
144  ::avro::encode(e, v.tableName);
145  ::avro::encode(e, v.tableNames);
146  ::avro::encode(e, v.inputColumnNames);
147  ::avro::encode(e, v.outputColumnNames);
148  ::avro::encode(e, v.options);
149  }
150 
151  static void decode(Decoder& d, gpudb::CreateUnionRequest& v)
152  {
153  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
154  {
155  const std::vector<size_t> fo = rd->fieldOrder();
156 
157  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
158  {
159  switch (*it)
160  {
161  case 0:
162  ::avro::decode(d, v.tableName);
163  break;
164 
165  case 1:
166  ::avro::decode(d, v.tableNames);
167  break;
168 
169  case 2:
170  ::avro::decode(d, v.inputColumnNames);
171  break;
172 
173  case 3:
174  ::avro::decode(d, v.outputColumnNames);
175  break;
176 
177  case 4:
178  ::avro::decode(d, v.options);
179  break;
180 
181  default:
182  break;
183  }
184  }
185  }
186  else
187  {
188  ::avro::decode(d, v.tableName);
189  ::avro::decode(d, v.tableNames);
190  ::avro::decode(d, v.inputColumnNames);
191  ::avro::decode(d, v.outputColumnNames);
192  ::avro::decode(d, v.options);
193  }
194  }
195  };
196 }
197 
198 namespace gpudb
199 {
200 
215  {
216 
222  tableName(std::string())
223  {
224  }
225 
226  std::string tableName;
227  };
228 }
229 
230 namespace avro
231 {
232  template<> struct codec_traits<gpudb::CreateUnionResponse>
233  {
234  static void encode(Encoder& e, const gpudb::CreateUnionResponse& v)
235  {
236  ::avro::encode(e, v.tableName);
237  }
238 
239  static void decode(Decoder& d, gpudb::CreateUnionResponse& v)
240  {
241  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
242  {
243  const std::vector<size_t> fo = rd->fieldOrder();
244 
245  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
246  {
247  switch (*it)
248  {
249  case 0:
250  ::avro::decode(d, v.tableName);
251  break;
252 
253  default:
254  break;
255  }
256  }
257  }
258  else
259  {
260  ::avro::decode(d, v.tableName);
261  }
262  }
263  };
264 }
265 
266 #endif
std::vector< std::string > tableNames
Definition: create_union.h:131
CreateUnionResponse()
Constructs a CreateUnionResponse object with default parameter values.
Definition: create_union.h:221
A set of input parameters for const.
Definition: create_union.h:25
std::vector< std::string > outputColumnNames
Definition: create_union.h:133
std::map< std::string, std::string > options
Definition: create_union.h:134
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:121
A set of output parameters for const.
Definition: create_union.h:214
std::vector< std::vector< std::string > > inputColumnNames
Definition: create_union.h:132
CreateUnionRequest()
Constructs a CreateUnionRequest object with default parameter values.
Definition: create_union.h:32