GPUdb C++ API  Version 5.2.0.0
insert_records_random.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 __INSERT_RECORDS_RANDOM_H__
7 #define __INSERT_RECORDS_RANDOM_H__
8 
9 namespace gpudb
10 {
11 
27  {
28 
34  tableName(std::string()),
35  count(int64_t()),
36  options(std::map<std::string, std::map<std::string, double> >())
37  {
38  }
39 
203  InsertRecordsRandomRequest(const std::string& tableName, const int64_t count, const std::map<std::string, std::map<std::string, double> >& options):
204  tableName(tableName),
205  count(count),
207  {
208  }
209 
210  std::string tableName;
211  int64_t count;
212  std::map<std::string, std::map<std::string, double> > options;
213  };
214 }
215 
216 namespace avro
217 {
218  template<> struct codec_traits<gpudb::InsertRecordsRandomRequest>
219  {
220  static void encode(Encoder& e, const gpudb::InsertRecordsRandomRequest& v)
221  {
222  ::avro::encode(e, v.tableName);
223  ::avro::encode(e, v.count);
224  ::avro::encode(e, v.options);
225  }
226 
227  static void decode(Decoder& d, gpudb::InsertRecordsRandomRequest& v)
228  {
229  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
230  {
231  const std::vector<size_t> fo = rd->fieldOrder();
232 
233  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
234  {
235  switch (*it)
236  {
237  case 0:
238  ::avro::decode(d, v.tableName);
239  break;
240 
241  case 1:
242  ::avro::decode(d, v.count);
243  break;
244 
245  case 2:
246  ::avro::decode(d, v.options);
247  break;
248 
249  default:
250  break;
251  }
252  }
253  }
254  else
255  {
256  ::avro::decode(d, v.tableName);
257  ::avro::decode(d, v.count);
258  ::avro::decode(d, v.options);
259  }
260  }
261  };
262 }
263 
264 namespace gpudb
265 {
266 
282  {
283 
289  tableName(std::string()),
290  count(int64_t())
291  {
292  }
293 
294  std::string tableName;
295  int64_t count;
296  };
297 }
298 
299 namespace avro
300 {
301  template<> struct codec_traits<gpudb::InsertRecordsRandomResponse>
302  {
303  static void encode(Encoder& e, const gpudb::InsertRecordsRandomResponse& v)
304  {
305  ::avro::encode(e, v.tableName);
306  ::avro::encode(e, v.count);
307  }
308 
309  static void decode(Decoder& d, gpudb::InsertRecordsRandomResponse& v)
310  {
311  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
312  {
313  const std::vector<size_t> fo = rd->fieldOrder();
314 
315  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
316  {
317  switch (*it)
318  {
319  case 0:
320  ::avro::decode(d, v.tableName);
321  break;
322 
323  case 1:
324  ::avro::decode(d, v.count);
325  break;
326 
327  default:
328  break;
329  }
330  }
331  }
332  else
333  {
334  ::avro::decode(d, v.tableName);
335  ::avro::decode(d, v.count);
336  }
337  }
338  };
339 }
340 
341 #endif
InsertRecordsRandomRequest()
Constructs an InsertRecordsRandomRequest object with default parameter values.
A set of output parameters for insertRecordsRandom(const InsertRecordsRandomRequest&) const...
std::map< std::string, std::map< std::string, double > > options
InsertRecordsRandomRequest(const std::string &tableName, const int64_t count, const std::map< std::string, std::map< std::string, double > > &options)
Constructs an InsertRecordsRandomRequest object with the specified parameters.
InsertRecordsRandomResponse()
Constructs an InsertRecordsRandomResponse object with default parameter values.
A set of input parameters for insertRecordsRandom(const InsertRecordsRandomRequest&) const...