GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
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 
45  {
46 
52  tableName(std::string()),
53  projectionName(std::string()),
54  columnNames(std::vector<std::string>()),
55  options(std::map<std::string, std::string>())
56  {
57  }
58 
133  CreateProjectionRequest(const std::string& tableName_, const std::string& projectionName_, const std::vector<std::string>& columnNames_, const std::map<std::string, std::string>& options_):
134  tableName( tableName_ ),
135  projectionName( projectionName_ ),
136  columnNames( columnNames_ ),
137  options( options_ )
138  {
139  }
140 
141  std::string tableName;
142  std::string projectionName;
143  std::vector<std::string> columnNames;
144  std::map<std::string, std::string> options;
145  };
146 }
147 
148 namespace avro
149 {
150  template<> struct codec_traits<gpudb::CreateProjectionRequest>
151  {
152  static void encode(Encoder& e, const gpudb::CreateProjectionRequest& v)
153  {
154  ::avro::encode(e, v.tableName);
155  ::avro::encode(e, v.projectionName);
156  ::avro::encode(e, v.columnNames);
157  ::avro::encode(e, v.options);
158  }
159 
160  static void decode(Decoder& d, gpudb::CreateProjectionRequest& 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.projectionName);
176  break;
177 
178  case 2:
179  ::avro::decode(d, v.columnNames);
180  break;
181 
182  case 3:
183  ::avro::decode(d, v.options);
184  break;
185 
186  default:
187  break;
188  }
189  }
190  }
191  else
192  {
193  ::avro::decode(d, v.tableName);
194  ::avro::decode(d, v.projectionName);
195  ::avro::decode(d, v.columnNames);
196  ::avro::decode(d, v.options);
197  }
198  }
199  };
200 }
201 
202 namespace gpudb
203 {
204 
238  {
239 
245  projectionName(std::string())
246  {
247  }
248 
249  std::string projectionName;
250  };
251 }
252 
253 namespace avro
254 {
255  template<> struct codec_traits<gpudb::CreateProjectionResponse>
256  {
257  static void encode(Encoder& e, const gpudb::CreateProjectionResponse& v)
258  {
259  ::avro::encode(e, v.projectionName);
260  }
261 
262  static void decode(Decoder& d, gpudb::CreateProjectionResponse& v)
263  {
264  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
265  {
266  const std::vector<size_t> fo = rd->fieldOrder();
267 
268  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
269  {
270  switch (*it)
271  {
272  case 0:
273  ::avro::decode(d, v.projectionName);
274  break;
275 
276  default:
277  break;
278  }
279  }
280  }
281  else
282  {
283  ::avro::decode(d, v.projectionName);
284  }
285  }
286  };
287 }
288 
289 #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::vector< std::string > columnNames
A set of input parameters for const.