GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
31  {
32 
38  tableName(std::string()),
39  count(int64_t()),
40  options(std::map<std::string, std::map<std::string, double> >())
41  {
42  }
43 
278  InsertRecordsRandomRequest(const std::string& tableName_, const int64_t count_, const std::map<std::string, std::map<std::string, double> >& options_):
279  tableName( tableName_ ),
280  count( count_ ),
281  options( options_ )
282  {
283  }
284 
285  std::string tableName;
286  int64_t count;
287  std::map<std::string, std::map<std::string, double> > options;
288  };
289 }
290 
291 namespace avro
292 {
293  template<> struct codec_traits<gpudb::InsertRecordsRandomRequest>
294  {
295  static void encode(Encoder& e, const gpudb::InsertRecordsRandomRequest& v)
296  {
297  ::avro::encode(e, v.tableName);
298  ::avro::encode(e, v.count);
299  ::avro::encode(e, v.options);
300  }
301 
302  static void decode(Decoder& d, gpudb::InsertRecordsRandomRequest& v)
303  {
304  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
305  {
306  const std::vector<size_t> fo = rd->fieldOrder();
307 
308  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
309  {
310  switch (*it)
311  {
312  case 0:
313  ::avro::decode(d, v.tableName);
314  break;
315 
316  case 1:
317  ::avro::decode(d, v.count);
318  break;
319 
320  case 2:
321  ::avro::decode(d, v.options);
322  break;
323 
324  default:
325  break;
326  }
327  }
328  }
329  else
330  {
331  ::avro::decode(d, v.tableName);
332  ::avro::decode(d, v.count);
333  ::avro::decode(d, v.options);
334  }
335  }
336  };
337 }
338 
339 namespace gpudb
340 {
341 
361  {
362 
368  tableName(std::string()),
369  count(int64_t()),
370  info(std::map<std::string, std::string>())
371  {
372  }
373 
374  std::string tableName;
375  int64_t count;
376  std::map<std::string, std::string> info;
377  };
378 }
379 
380 namespace avro
381 {
382  template<> struct codec_traits<gpudb::InsertRecordsRandomResponse>
383  {
384  static void encode(Encoder& e, const gpudb::InsertRecordsRandomResponse& v)
385  {
386  ::avro::encode(e, v.tableName);
387  ::avro::encode(e, v.count);
388  ::avro::encode(e, v.info);
389  }
390 
391  static void decode(Decoder& d, gpudb::InsertRecordsRandomResponse& v)
392  {
393  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
394  {
395  const std::vector<size_t> fo = rd->fieldOrder();
396 
397  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
398  {
399  switch (*it)
400  {
401  case 0:
402  ::avro::decode(d, v.tableName);
403  break;
404 
405  case 1:
406  ::avro::decode(d, v.count);
407  break;
408 
409  case 2:
410  ::avro::decode(d, v.info);
411  break;
412 
413  default:
414  break;
415  }
416  }
417  }
418  else
419  {
420  ::avro::decode(d, v.tableName);
421  ::avro::decode(d, v.count);
422  ::avro::decode(d, v.info);
423  }
424  }
425  };
426 }
427 
428 #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.
std::map< std::string, std::string > info
A set of output parameters for 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 const.