GPUdb C++ API  Version 7.2.2.4
create_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 __CREATE_PROC_H__
7 #define __CREATE_PROC_H__
8 
9 namespace gpudb
10 {
20  {
25  procName(std::string()),
26  executionMode(std::string()),
27  files(std::map<std::string, std::vector<uint8_t> >()),
28  command(std::string()),
29  args(std::vector<std::string>()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
116  CreateProcRequest(const std::string& procName_, const std::string& executionMode_, const std::map<std::string, std::vector<uint8_t> >& files_, const std::string& command_, const std::vector<std::string>& args_, const std::map<std::string, std::string>& options_):
117  procName( procName_ ),
118  executionMode( executionMode_ ),
119  files( files_ ),
120  command( command_ ),
121  args( args_ ),
122  options( options_ )
123  {
124  }
125 
130  std::string procName;
131 
155  std::string executionMode;
156 
167  std::map<std::string, std::vector<uint8_t> > files;
168 
181  std::string command;
182 
188  std::vector<std::string> args;
189 
205  std::map<std::string, std::string> options;
206  };
207 } // end namespace gpudb
208 
209 namespace avro
210 {
211  template<> struct codec_traits<gpudb::CreateProcRequest>
212  {
213  static void encode(Encoder& e, const gpudb::CreateProcRequest& v)
214  {
215  ::avro::encode(e, v.procName);
216  ::avro::encode(e, v.executionMode);
217  ::avro::encode(e, v.files);
218  ::avro::encode(e, v.command);
219  ::avro::encode(e, v.args);
220  ::avro::encode(e, v.options);
221  }
222 
223  static void decode(Decoder& d, gpudb::CreateProcRequest& v)
224  {
225  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
226  {
227  const std::vector<size_t> fo = rd->fieldOrder();
228 
229  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
230  {
231  switch (*it)
232  {
233  case 0:
234  ::avro::decode(d, v.procName);
235  break;
236 
237  case 1:
238  ::avro::decode(d, v.executionMode);
239  break;
240 
241  case 2:
242  ::avro::decode(d, v.files);
243  break;
244 
245  case 3:
246  ::avro::decode(d, v.command);
247  break;
248 
249  case 4:
250  ::avro::decode(d, v.args);
251  break;
252 
253  case 5:
254  ::avro::decode(d, v.options);
255  break;
256 
257  default:
258  break;
259  }
260  }
261  }
262  else
263  {
264  ::avro::decode(d, v.procName);
265  ::avro::decode(d, v.executionMode);
266  ::avro::decode(d, v.files);
267  ::avro::decode(d, v.command);
268  ::avro::decode(d, v.args);
269  ::avro::decode(d, v.options);
270  }
271  }
272  };
273 } // end namespace avro
274 
275 namespace gpudb
276 {
282  {
287  procName(std::string()),
288  info(std::map<std::string, std::string>())
289  {
290  }
291 
295  std::string procName;
296 
300  std::map<std::string, std::string> info;
301  };
302 } // end namespace gpudb
303 
304 namespace avro
305 {
306  template<> struct codec_traits<gpudb::CreateProcResponse>
307  {
308  static void encode(Encoder& e, const gpudb::CreateProcResponse& v)
309  {
310  ::avro::encode(e, v.procName);
311  ::avro::encode(e, v.info);
312  }
313 
314  static void decode(Decoder& d, gpudb::CreateProcResponse& v)
315  {
316  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
317  {
318  const std::vector<size_t> fo = rd->fieldOrder();
319 
320  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
321  {
322  switch (*it)
323  {
324  case 0:
325  ::avro::decode(d, v.procName);
326  break;
327 
328  case 1:
329  ::avro::decode(d, v.info);
330  break;
331 
332  default:
333  break;
334  }
335  }
336  }
337  else
338  {
339  ::avro::decode(d, v.procName);
340  ::avro::decode(d, v.info);
341  }
342  }
343  };
344 } // end namespace avro
345 
346 #endif // __CREATE_PROC_H__
std::map< std::string, std::vector< uint8_t > > files
A map of the files that make up the proc.
Definition: create_proc.h:167
CreateProcResponse()
Constructs a CreateProcResponse object with default parameters.
Definition: create_proc.h:286
std::vector< std::string > args
An array of command-line arguments that will be passed to command when the proc is executed.
Definition: create_proc.h:188
CreateProcRequest()
Constructs a CreateProcRequest object with default parameters.
Definition: create_proc.h:24
std::string executionMode
The execution mode of the proc.
Definition: create_proc.h:155
A set of results returned by GPUdb::createProc.
Definition: create_proc.h:281
std::string procName
Value of procName.
Definition: create_proc.h:295
CreateProcRequest(const std::string &procName_, const std::string &executionMode_, const std::map< std::string, std::vector< uint8_t > > &files_, const std::string &command_, const std::vector< std::string > &args_, const std::map< std::string, std::string > &options_)
Constructs a CreateProcRequest object with the specified parameters.
Definition: create_proc.h:116
std::map< std::string, std::string > options
Optional parameters.
Definition: create_proc.h:205
A set of parameters for GPUdb::createProc.
Definition: create_proc.h:19
std::string procName
Name of the proc to be created.
Definition: create_proc.h:130
std::map< std::string, std::string > info
Additional information.
Definition: create_proc.h:300
std::string command
The command (excluding arguments) that will be invoked when the proc is executed.
Definition: create_proc.h:181