GPUdb C++ API  Version 7.2.2.4
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 
201  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_):
202  procName( procName_ ),
203  params( params_ ),
204  binParams( binParams_ ),
205  inputTableNames( inputTableNames_ ),
206  inputColumnNames( inputColumnNames_ ),
207  outputTableNames( outputTableNames_ ),
208  options( options_ )
209  {
210  }
211 
216  std::string procName;
217 
223  std::map<std::string, std::string> params;
224 
230  std::map<std::string, std::vector<uint8_t> > binParams;
231 
242  std::vector<std::string> inputTableNames;
243 
253  std::map<std::string, std::vector<std::string> > inputColumnNames;
254 
271  std::vector<std::string> outputTableNames;
272 
345  std::map<std::string, std::string> options;
346  };
347 } // end namespace gpudb
348 
349 namespace avro
350 {
351  template<> struct codec_traits<gpudb::ExecuteProcRequest>
352  {
353  static void encode(Encoder& e, const gpudb::ExecuteProcRequest& v)
354  {
355  ::avro::encode(e, v.procName);
356  ::avro::encode(e, v.params);
357  ::avro::encode(e, v.binParams);
358  ::avro::encode(e, v.inputTableNames);
359  ::avro::encode(e, v.inputColumnNames);
360  ::avro::encode(e, v.outputTableNames);
361  ::avro::encode(e, v.options);
362  }
363 
364  static void decode(Decoder& d, gpudb::ExecuteProcRequest& v)
365  {
366  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
367  {
368  const std::vector<size_t> fo = rd->fieldOrder();
369 
370  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
371  {
372  switch (*it)
373  {
374  case 0:
375  ::avro::decode(d, v.procName);
376  break;
377 
378  case 1:
379  ::avro::decode(d, v.params);
380  break;
381 
382  case 2:
383  ::avro::decode(d, v.binParams);
384  break;
385 
386  case 3:
387  ::avro::decode(d, v.inputTableNames);
388  break;
389 
390  case 4:
391  ::avro::decode(d, v.inputColumnNames);
392  break;
393 
394  case 5:
395  ::avro::decode(d, v.outputTableNames);
396  break;
397 
398  case 6:
399  ::avro::decode(d, v.options);
400  break;
401 
402  default:
403  break;
404  }
405  }
406  }
407  else
408  {
409  ::avro::decode(d, v.procName);
410  ::avro::decode(d, v.params);
411  ::avro::decode(d, v.binParams);
412  ::avro::decode(d, v.inputTableNames);
413  ::avro::decode(d, v.inputColumnNames);
414  ::avro::decode(d, v.outputTableNames);
415  ::avro::decode(d, v.options);
416  }
417  }
418  };
419 } // end namespace avro
420 
421 namespace gpudb
422 {
429  {
434  runId(std::string()),
435  info(std::map<std::string, std::string>())
436  {
437  }
438 
446  std::string runId;
447 
451  std::map<std::string, std::string> info;
452  };
453 } // end namespace gpudb
454 
455 namespace avro
456 {
457  template<> struct codec_traits<gpudb::ExecuteProcResponse>
458  {
459  static void encode(Encoder& e, const gpudb::ExecuteProcResponse& v)
460  {
461  ::avro::encode(e, v.runId);
462  ::avro::encode(e, v.info);
463  }
464 
465  static void decode(Decoder& d, gpudb::ExecuteProcResponse& v)
466  {
467  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
468  {
469  const std::vector<size_t> fo = rd->fieldOrder();
470 
471  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
472  {
473  switch (*it)
474  {
475  case 0:
476  ::avro::decode(d, v.runId);
477  break;
478 
479  case 1:
480  ::avro::decode(d, v.info);
481  break;
482 
483  default:
484  break;
485  }
486  }
487  }
488  else
489  {
490  ::avro::decode(d, v.runId);
491  ::avro::decode(d, v.info);
492  }
493  }
494  };
495 } // end namespace avro
496 
497 #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:223
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:271
std::string runId
The run ID of the running proc instance.
Definition: execute_proc.h:446
std::map< std::string, std::vector< uint8_t > > binParams
A map containing named binary parameters to pass to the proc.
Definition: execute_proc.h:230
std::string procName
Name of the proc to execute.
Definition: execute_proc.h:216
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:253
A set of results returned by GPUdb::executeProc.
Definition: execute_proc.h:428
std::map< std::string, std::string > options
Optional parameters.
Definition: execute_proc.h:345
std::vector< std::string > inputTableNames
Names of the tables containing data to be passed to the proc.
Definition: execute_proc.h:242
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:201
ExecuteProcResponse()
Constructs an ExecuteProcResponse object with default parameters.
Definition: execute_proc.h:433
std::map< std::string, std::string > info
Additional information.
Definition: execute_proc.h:451