GPUdb C++ API  Version 6.1.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 
276  InsertRecordsRandomRequest(const std::string& tableName_, const int64_t count_, const std::map<std::string, std::map<std::string, double> >& options_):
277  tableName( tableName_ ),
278  count( count_ ),
279  options( options_ )
280  {
281  }
282 
283  std::string tableName;
284  int64_t count;
285  std::map<std::string, std::map<std::string, double> > options;
286  };
287 }
288 
289 namespace avro
290 {
291  template<> struct codec_traits<gpudb::InsertRecordsRandomRequest>
292  {
293  static void encode(Encoder& e, const gpudb::InsertRecordsRandomRequest& v)
294  {
295  ::avro::encode(e, v.tableName);
296  ::avro::encode(e, v.count);
297  ::avro::encode(e, v.options);
298  }
299 
300  static void decode(Decoder& d, gpudb::InsertRecordsRandomRequest& v)
301  {
302  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
303  {
304  const std::vector<size_t> fo = rd->fieldOrder();
305 
306  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
307  {
308  switch (*it)
309  {
310  case 0:
311  ::avro::decode(d, v.tableName);
312  break;
313 
314  case 1:
315  ::avro::decode(d, v.count);
316  break;
317 
318  case 2:
319  ::avro::decode(d, v.options);
320  break;
321 
322  default:
323  break;
324  }
325  }
326  }
327  else
328  {
329  ::avro::decode(d, v.tableName);
330  ::avro::decode(d, v.count);
331  ::avro::decode(d, v.options);
332  }
333  }
334  };
335 }
336 
337 namespace gpudb
338 {
339 
355  {
356 
362  tableName(std::string()),
363  count(int64_t())
364  {
365  }
366 
367  std::string tableName;
368  int64_t count;
369  };
370 }
371 
372 namespace avro
373 {
374  template<> struct codec_traits<gpudb::InsertRecordsRandomResponse>
375  {
376  static void encode(Encoder& e, const gpudb::InsertRecordsRandomResponse& v)
377  {
378  ::avro::encode(e, v.tableName);
379  ::avro::encode(e, v.count);
380  }
381 
382  static void decode(Decoder& d, gpudb::InsertRecordsRandomResponse& v)
383  {
384  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
385  {
386  const std::vector<size_t> fo = rd->fieldOrder();
387 
388  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
389  {
390  switch (*it)
391  {
392  case 0:
393  ::avro::decode(d, v.tableName);
394  break;
395 
396  case 1:
397  ::avro::decode(d, v.count);
398  break;
399 
400  default:
401  break;
402  }
403  }
404  }
405  else
406  {
407  ::avro::decode(d, v.tableName);
408  ::avro::decode(d, v.count);
409  }
410  }
411  };
412 }
413 
414 #endif
InsertRecordsRandomRequest()
Constructs an InsertRecordsRandomRequest object with default parameter values.
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.
A set of output parameters for insertRecordsRandom(const InsertRecordsRandomRequest&) const...
std::map< std::string, std::map< std::string, double > > options
InsertRecordsRandomResponse()
Constructs an InsertRecordsRandomResponse object with default parameter values.
A set of input parameters for insertRecordsRandom(const InsertRecordsRandomRequest&) const...