GPUdb C++ API  Version 7.2.3.0
execute_proc.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __EXECUTE_PROC_H__
7 #define __EXECUTE_PROC_H__
8 
9 namespace gpudb
10 {
27  {
32  procName(std::string()),
33  params(std::map<std::string, std::string>()),
34  binParams(std::map<std::string, std::vector<uint8_t> >()),
35  inputTableNames(std::vector<std::string>()),
36  inputColumnNames(std::map<std::string, std::vector<std::string> >()),
37  outputTableNames(std::vector<std::string>()),
38  options(std::map<std::string, std::string>())
39  {
40  }
41 
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 
186  std::string procName;
187 
193  std::map<std::string, std::string> params;
194 
200  std::map<std::string, std::vector<uint8_t> > binParams;
201 
212  std::vector<std::string> inputTableNames;
213 
223  std::map<std::string, std::vector<std::string> > inputColumnNames;
224 
241  std::vector<std::string> outputTableNames;
242 
293  std::map<std::string, std::string> options;
294  };
295 } // end namespace gpudb
296 
297 namespace avro
298 {
299  template<> struct codec_traits<gpudb::ExecuteProcRequest>
300  {
301  static void encode(Encoder& e, const gpudb::ExecuteProcRequest& v)
302  {
303  ::avro::encode(e, v.procName);
304  ::avro::encode(e, v.params);
305  ::avro::encode(e, v.binParams);
306  ::avro::encode(e, v.inputTableNames);
307  ::avro::encode(e, v.inputColumnNames);
308  ::avro::encode(e, v.outputTableNames);
309  ::avro::encode(e, v.options);
310  }
311 
312  static void decode(Decoder& d, gpudb::ExecuteProcRequest& v)
313  {
314  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
315  {
316  const std::vector<size_t> fo = rd->fieldOrder();
317 
318  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
319  {
320  switch (*it)
321  {
322  case 0:
323  ::avro::decode(d, v.procName);
324  break;
325 
326  case 1:
327  ::avro::decode(d, v.params);
328  break;
329 
330  case 2:
331  ::avro::decode(d, v.binParams);
332  break;
333 
334  case 3:
335  ::avro::decode(d, v.inputTableNames);
336  break;
337 
338  case 4:
339  ::avro::decode(d, v.inputColumnNames);
340  break;
341 
342  case 5:
343  ::avro::decode(d, v.outputTableNames);
344  break;
345 
346  case 6:
347  ::avro::decode(d, v.options);
348  break;
349 
350  default:
351  break;
352  }
353  }
354  }
355  else
356  {
357  ::avro::decode(d, v.procName);
358  ::avro::decode(d, v.params);
359  ::avro::decode(d, v.binParams);
360  ::avro::decode(d, v.inputTableNames);
361  ::avro::decode(d, v.inputColumnNames);
362  ::avro::decode(d, v.outputTableNames);
363  ::avro::decode(d, v.options);
364  }
365  }
366  };
367 } // end namespace avro
368 
369 namespace gpudb
370 {
377  {
382  runId(std::string()),
383  info(std::map<std::string, std::string>())
384  {
385  }
386 
394  std::string runId;
395 
399  std::map<std::string, std::string> info;
400  };
401 } // end namespace gpudb
402 
403 namespace avro
404 {
405  template<> struct codec_traits<gpudb::ExecuteProcResponse>
406  {
407  static void encode(Encoder& e, const gpudb::ExecuteProcResponse& v)
408  {
409  ::avro::encode(e, v.runId);
410  ::avro::encode(e, v.info);
411  }
412 
413  static void decode(Decoder& d, gpudb::ExecuteProcResponse& v)
414  {
415  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
416  {
417  const std::vector<size_t> fo = rd->fieldOrder();
418 
419  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
420  {
421  switch (*it)
422  {
423  case 0:
424  ::avro::decode(d, v.runId);
425  break;
426 
427  case 1:
428  ::avro::decode(d, v.info);
429  break;
430 
431  default:
432  break;
433  }
434  }
435  }
436  else
437  {
438  ::avro::decode(d, v.runId);
439  ::avro::decode(d, v.info);
440  }
441  }
442  };
443 } // end namespace avro
444 
445 #endif // __EXECUTE_PROC_H__
ExecuteProcRequest()
Constructs an ExecuteProcRequest object with default parameters.
Definition: execute_proc.h:31
std::map< std::string, std::string > params
A map containing named parameters to pass to the proc.
Definition: execute_proc.h:193
A set of parameters for GPUdb::executeProc.
Definition: execute_proc.h:26
std::vector< std::string > outputTableNames
Names of the tables to which output data from the proc will be written, each in [ schema_name....
Definition: execute_proc.h:241
std::string runId
The run ID of the running proc instance.
Definition: execute_proc.h:394
std::map< std::string, std::vector< uint8_t > > binParams
A map containing named binary parameters to pass to the proc.
Definition: execute_proc.h:200
std::string procName
Name of the proc to execute.
Definition: execute_proc.h:186
std::map< std::string, std::vector< std::string > > inputColumnNames
Map of table names from inputTableNames to lists of names of columns from those tables that will be p...
Definition: execute_proc.h:223
A set of results returned by GPUdb::executeProc.
Definition: execute_proc.h:376
std::map< std::string, std::string > options
Optional parameters.
Definition: execute_proc.h:293
std::vector< std::string > inputTableNames
Names of the tables containing data to be passed to the proc.
Definition: execute_proc.h:212
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 parameters.
Definition: execute_proc.h:381
std::map< std::string, std::string > info
Additional information.
Definition: execute_proc.h:399