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