GPUdb C++ API  Version 7.0.19.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 
20  {
21 
27  procName(std::string()),
28  params(std::map<std::string, std::string>()),
29  binParams(std::map<std::string, std::vector<uint8_t> >()),
30  inputTableNames(std::vector<std::string>()),
31  inputColumnNames(std::map<std::string, std::vector<std::string> >()),
32  outputTableNames(std::vector<std::string>()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
122  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_):
123  procName( procName_ ),
124  params( params_ ),
125  binParams( binParams_ ),
126  inputTableNames( inputTableNames_ ),
127  inputColumnNames( inputColumnNames_ ),
128  outputTableNames( outputTableNames_ ),
129  options( options_ )
130  {
131  }
132 
133  std::string procName;
134  std::map<std::string, std::string> params;
135  std::map<std::string, std::vector<uint8_t> > binParams;
136  std::vector<std::string> inputTableNames;
137  std::map<std::string, std::vector<std::string> > inputColumnNames;
138  std::vector<std::string> outputTableNames;
139  std::map<std::string, std::string> options;
140  };
141 }
142 
143 namespace avro
144 {
145  template<> struct codec_traits<gpudb::ExecuteProcRequest>
146  {
147  static void encode(Encoder& e, const gpudb::ExecuteProcRequest& v)
148  {
149  ::avro::encode(e, v.procName);
150  ::avro::encode(e, v.params);
151  ::avro::encode(e, v.binParams);
152  ::avro::encode(e, v.inputTableNames);
153  ::avro::encode(e, v.inputColumnNames);
154  ::avro::encode(e, v.outputTableNames);
155  ::avro::encode(e, v.options);
156  }
157 
158  static void decode(Decoder& d, gpudb::ExecuteProcRequest& v)
159  {
160  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
161  {
162  const std::vector<size_t> fo = rd->fieldOrder();
163 
164  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
165  {
166  switch (*it)
167  {
168  case 0:
169  ::avro::decode(d, v.procName);
170  break;
171 
172  case 1:
173  ::avro::decode(d, v.params);
174  break;
175 
176  case 2:
177  ::avro::decode(d, v.binParams);
178  break;
179 
180  case 3:
181  ::avro::decode(d, v.inputTableNames);
182  break;
183 
184  case 4:
185  ::avro::decode(d, v.inputColumnNames);
186  break;
187 
188  case 5:
189  ::avro::decode(d, v.outputTableNames);
190  break;
191 
192  case 6:
193  ::avro::decode(d, v.options);
194  break;
195 
196  default:
197  break;
198  }
199  }
200  }
201  else
202  {
203  ::avro::decode(d, v.procName);
204  ::avro::decode(d, v.params);
205  ::avro::decode(d, v.binParams);
206  ::avro::decode(d, v.inputTableNames);
207  ::avro::decode(d, v.inputColumnNames);
208  ::avro::decode(d, v.outputTableNames);
209  ::avro::decode(d, v.options);
210  }
211  }
212  };
213 }
214 
215 namespace gpudb
216 {
217 
226  {
227 
233  runId(std::string()),
234  info(std::map<std::string, std::string>())
235  {
236  }
237 
238  std::string runId;
239  std::map<std::string, std::string> info;
240  };
241 }
242 
243 namespace avro
244 {
245  template<> struct codec_traits<gpudb::ExecuteProcResponse>
246  {
247  static void encode(Encoder& e, const gpudb::ExecuteProcResponse& v)
248  {
249  ::avro::encode(e, v.runId);
250  ::avro::encode(e, v.info);
251  }
252 
253  static void decode(Decoder& d, gpudb::ExecuteProcResponse& v)
254  {
255  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
256  {
257  const std::vector<size_t> fo = rd->fieldOrder();
258 
259  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
260  {
261  switch (*it)
262  {
263  case 0:
264  ::avro::decode(d, v.runId);
265  break;
266 
267  case 1:
268  ::avro::decode(d, v.info);
269  break;
270 
271  default:
272  break;
273  }
274  }
275  }
276  else
277  {
278  ::avro::decode(d, v.runId);
279  ::avro::decode(d, v.info);
280  }
281  }
282  };
283 }
284 
285 #endif
ExecuteProcRequest()
Constructs an ExecuteProcRequest object with default parameter values.
Definition: execute_proc.h:26
std::map< std::string, std::string > params
Definition: execute_proc.h:134
A set of input parameters for const.
Definition: execute_proc.h:19
std::vector< std::string > outputTableNames
Definition: execute_proc.h:138
std::map< std::string, std::vector< uint8_t > > binParams
Definition: execute_proc.h:135
std::map< std::string, std::vector< std::string > > inputColumnNames
Definition: execute_proc.h:137
A set of output parameters for const.
Definition: execute_proc.h:225
std::map< std::string, std::string > options
Definition: execute_proc.h:139
std::vector< std::string > inputTableNames
Definition: execute_proc.h:136
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:122
ExecuteProcResponse()
Constructs an ExecuteProcResponse object with default parameter values.
Definition: execute_proc.h:232
std::map< std::string, std::string > info
Definition: execute_proc.h:239