GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
execute_proc.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 __EXECUTE_PROC_H__
7 #define __EXECUTE_PROC_H__
8 
9 namespace gpudb
10 {
11 
29  {
30 
36  procName(std::string()),
37  params(std::map<std::string, std::string>()),
38  binParams(std::map<std::string, std::vector<uint8_t> >()),
39  inputTableNames(std::vector<std::string>()),
40  inputColumnNames(std::map<std::string, std::vector<std::string> >()),
41  outputTableNames(std::vector<std::string>()),
42  options(std::map<std::string, std::string>())
43  {
44  }
45 
171  ExecuteProcRequest(const std::string& procName_, const std::map<std::string, std::string>& params_, const std::map<std::string, std::vector<uint8_t> >& binParams_, const std::vector<std::string>& inputTableNames_, const std::map<std::string, std::vector<std::string> >& inputColumnNames_, const std::vector<std::string>& outputTableNames_, const std::map<std::string, std::string>& options_):
172  procName( procName_ ),
173  params( params_ ),
174  binParams( binParams_ ),
175  inputTableNames( inputTableNames_ ),
176  inputColumnNames( inputColumnNames_ ),
177  outputTableNames( outputTableNames_ ),
178  options( options_ )
179  {
180  }
181 
182  std::string procName;
183  std::map<std::string, std::string> params;
184  std::map<std::string, std::vector<uint8_t> > binParams;
185  std::vector<std::string> inputTableNames;
186  std::map<std::string, std::vector<std::string> > inputColumnNames;
187  std::vector<std::string> outputTableNames;
188  std::map<std::string, std::string> options;
189  };
190 }
191 
192 namespace avro
193 {
194  template<> struct codec_traits<gpudb::ExecuteProcRequest>
195  {
196  static void encode(Encoder& e, const gpudb::ExecuteProcRequest& v)
197  {
198  ::avro::encode(e, v.procName);
199  ::avro::encode(e, v.params);
200  ::avro::encode(e, v.binParams);
201  ::avro::encode(e, v.inputTableNames);
202  ::avro::encode(e, v.inputColumnNames);
203  ::avro::encode(e, v.outputTableNames);
204  ::avro::encode(e, v.options);
205  }
206 
207  static void decode(Decoder& d, gpudb::ExecuteProcRequest& v)
208  {
209  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
210  {
211  const std::vector<size_t> fo = rd->fieldOrder();
212 
213  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
214  {
215  switch (*it)
216  {
217  case 0:
218  ::avro::decode(d, v.procName);
219  break;
220 
221  case 1:
222  ::avro::decode(d, v.params);
223  break;
224 
225  case 2:
226  ::avro::decode(d, v.binParams);
227  break;
228 
229  case 3:
230  ::avro::decode(d, v.inputTableNames);
231  break;
232 
233  case 4:
234  ::avro::decode(d, v.inputColumnNames);
235  break;
236 
237  case 5:
238  ::avro::decode(d, v.outputTableNames);
239  break;
240 
241  case 6:
242  ::avro::decode(d, v.options);
243  break;
244 
245  default:
246  break;
247  }
248  }
249  }
250  else
251  {
252  ::avro::decode(d, v.procName);
253  ::avro::decode(d, v.params);
254  ::avro::decode(d, v.binParams);
255  ::avro::decode(d, v.inputTableNames);
256  ::avro::decode(d, v.inputColumnNames);
257  ::avro::decode(d, v.outputTableNames);
258  ::avro::decode(d, v.options);
259  }
260  }
261  };
262 }
263 
264 namespace gpudb
265 {
266 
284  {
285 
291  runId(std::string()),
292  info(std::map<std::string, std::string>())
293  {
294  }
295 
296  std::string runId;
297  std::map<std::string, std::string> info;
298  };
299 }
300 
301 namespace avro
302 {
303  template<> struct codec_traits<gpudb::ExecuteProcResponse>
304  {
305  static void encode(Encoder& e, const gpudb::ExecuteProcResponse& v)
306  {
307  ::avro::encode(e, v.runId);
308  ::avro::encode(e, v.info);
309  }
310 
311  static void decode(Decoder& d, gpudb::ExecuteProcResponse& v)
312  {
313  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
314  {
315  const std::vector<size_t> fo = rd->fieldOrder();
316 
317  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
318  {
319  switch (*it)
320  {
321  case 0:
322  ::avro::decode(d, v.runId);
323  break;
324 
325  case 1:
326  ::avro::decode(d, v.info);
327  break;
328 
329  default:
330  break;
331  }
332  }
333  }
334  else
335  {
336  ::avro::decode(d, v.runId);
337  ::avro::decode(d, v.info);
338  }
339  }
340  };
341 }
342 
343 #endif
ExecuteProcRequest()
Constructs an ExecuteProcRequest object with default parameter values.
Definition: execute_proc.h:35
std::map< std::string, std::string > params
Definition: execute_proc.h:183
A set of input parameters for const.
Definition: execute_proc.h:28
std::vector< std::string > outputTableNames
Definition: execute_proc.h:187
std::map< std::string, std::vector< uint8_t > > binParams
Definition: execute_proc.h:184
std::map< std::string, std::vector< std::string > > inputColumnNames
Definition: execute_proc.h:186
A set of output parameters for const.
Definition: execute_proc.h:283
std::map< std::string, std::string > options
Definition: execute_proc.h:188
std::vector< std::string > inputTableNames
Definition: execute_proc.h:185
ExecuteProcRequest(const std::string &procName_, const std::map< std::string, std::string > &params_, const std::map< std::string, std::vector< uint8_t > > &binParams_, const std::vector< std::string > &inputTableNames_, const std::map< std::string, std::vector< std::string > > &inputColumnNames_, const std::vector< std::string > &outputTableNames_, const std::map< std::string, std::string > &options_)
Constructs an ExecuteProcRequest object with the specified parameters.
Definition: execute_proc.h:171
ExecuteProcResponse()
Constructs an ExecuteProcResponse object with default parameter values.
Definition: execute_proc.h:290
std::map< std::string, std::string > info
Definition: execute_proc.h:297