GPUdb C++ API  Version 6.1.0.0
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 
141  CreateProjectionRequest(const std::string& tableName_, const std::string& projectionName_, const std::vector<std::string>& columnNames_, const std::map<std::string, std::string>& options_):
142  tableName( tableName_ ),
143  projectionName( projectionName_ ),
144  columnNames( columnNames_ ),
145  options( options_ )
146  {
147  }
148 
149  std::string tableName;
150  std::string projectionName;
151  std::vector<std::string> columnNames;
152  std::map<std::string, std::string> options;
153  };
154 }
155 
156 namespace avro
157 {
158  template<> struct codec_traits<gpudb::CreateProjectionRequest>
159  {
160  static void encode(Encoder& e, const gpudb::CreateProjectionRequest& v)
161  {
162  ::avro::encode(e, v.tableName);
163  ::avro::encode(e, v.projectionName);
164  ::avro::encode(e, v.columnNames);
165  ::avro::encode(e, v.options);
166  }
167 
168  static void decode(Decoder& d, gpudb::CreateProjectionRequest& v)
169  {
170  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
171  {
172  const std::vector<size_t> fo = rd->fieldOrder();
173 
174  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
175  {
176  switch (*it)
177  {
178  case 0:
179  ::avro::decode(d, v.tableName);
180  break;
181 
182  case 1:
183  ::avro::decode(d, v.projectionName);
184  break;
185 
186  case 2:
187  ::avro::decode(d, v.columnNames);
188  break;
189 
190  case 3:
191  ::avro::decode(d, v.options);
192  break;
193 
194  default:
195  break;
196  }
197  }
198  }
199  else
200  {
201  ::avro::decode(d, v.tableName);
202  ::avro::decode(d, v.projectionName);
203  ::avro::decode(d, v.columnNames);
204  ::avro::decode(d, v.options);
205  }
206  }
207  };
208 }
209 
210 namespace gpudb
211 {
212 
246  {
247 
253  projectionName(std::string())
254  {
255  }
256 
257  std::string projectionName;
258  };
259 }
260 
261 namespace avro
262 {
263  template<> struct codec_traits<gpudb::CreateProjectionResponse>
264  {
265  static void encode(Encoder& e, const gpudb::CreateProjectionResponse& v)
266  {
267  ::avro::encode(e, v.projectionName);
268  }
269 
270  static void decode(Decoder& d, gpudb::CreateProjectionResponse& v)
271  {
272  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
273  {
274  const std::vector<size_t> fo = rd->fieldOrder();
275 
276  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
277  {
278  switch (*it)
279  {
280  case 0:
281  ::avro::decode(d, v.projectionName);
282  break;
283 
284  default:
285  break;
286  }
287  }
288  }
289  else
290  {
291  ::avro::decode(d, v.projectionName);
292  }
293  }
294  };
295 }
296 
297 #endif
CreateProjectionResponse()
Constructs a CreateProjectionResponse object with default parameter values.
A set of output parameters for createProjection(const CreateProjectionRequest&) 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 createProjection(const CreateProjectionRequest&) const.