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