GPUdb C++ API  Version 7.2.3.0
insert_records_random.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica 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 {
27  {
33  tableName(std::string()),
34  count(int64_t()),
35  options(std::map<std::string, std::map<std::string, double> >())
36  {
37  }
38 
375  InsertRecordsRandomRequest(const std::string& tableName_, const int64_t count_, const std::map<std::string, std::map<std::string, double> >& options_):
376  tableName( tableName_ ),
377  count( count_ ),
378  options( options_ )
379  {
380  }
381 
389  std::string tableName;
390 
394  int64_t count;
395 
603  std::map<std::string, std::map<std::string, double> > options;
604  };
605 } // end namespace gpudb
606 
607 namespace avro
608 {
609  template<> struct codec_traits<gpudb::InsertRecordsRandomRequest>
610  {
611  static void encode(Encoder& e, const gpudb::InsertRecordsRandomRequest& v)
612  {
613  ::avro::encode(e, v.tableName);
614  ::avro::encode(e, v.count);
615  ::avro::encode(e, v.options);
616  }
617 
618  static void decode(Decoder& d, gpudb::InsertRecordsRandomRequest& v)
619  {
620  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
621  {
622  const std::vector<size_t> fo = rd->fieldOrder();
623 
624  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
625  {
626  switch (*it)
627  {
628  case 0:
629  ::avro::decode(d, v.tableName);
630  break;
631 
632  case 1:
633  ::avro::decode(d, v.count);
634  break;
635 
636  case 2:
637  ::avro::decode(d, v.options);
638  break;
639 
640  default:
641  break;
642  }
643  }
644  }
645  else
646  {
647  ::avro::decode(d, v.tableName);
648  ::avro::decode(d, v.count);
649  ::avro::decode(d, v.options);
650  }
651  }
652  };
653 } // end namespace avro
654 
655 namespace gpudb
656 {
663  {
669  tableName(std::string()),
670  count(int64_t()),
671  info(std::map<std::string, std::string>())
672  {
673  }
674 
679  std::string tableName;
680 
684  int64_t count;
685 
689  std::map<std::string, std::string> info;
690  };
691 } // end namespace gpudb
692 
693 namespace avro
694 {
695  template<> struct codec_traits<gpudb::InsertRecordsRandomResponse>
696  {
697  static void encode(Encoder& e, const gpudb::InsertRecordsRandomResponse& v)
698  {
699  ::avro::encode(e, v.tableName);
700  ::avro::encode(e, v.count);
701  ::avro::encode(e, v.info);
702  }
703 
704  static void decode(Decoder& d, gpudb::InsertRecordsRandomResponse& v)
705  {
706  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
707  {
708  const std::vector<size_t> fo = rd->fieldOrder();
709 
710  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
711  {
712  switch (*it)
713  {
714  case 0:
715  ::avro::decode(d, v.tableName);
716  break;
717 
718  case 1:
719  ::avro::decode(d, v.count);
720  break;
721 
722  case 2:
723  ::avro::decode(d, v.info);
724  break;
725 
726  default:
727  break;
728  }
729  }
730  }
731  else
732  {
733  ::avro::decode(d, v.tableName);
734  ::avro::decode(d, v.count);
735  ::avro::decode(d, v.info);
736  }
737  }
738  };
739 } // end namespace avro
740 
741 #endif // __INSERT_RECORDS_RANDOM_H__
int64_t count
Number of records inserted.
InsertRecordsRandomRequest()
Constructs an InsertRecordsRandomRequest object with default parameters.
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
Additional information.
A set of results returned by GPUdb::insertRecordsRandom.
std::map< std::string, std::map< std::string, double > > options
Optional parameter to pass in specifications for the randomness of the values.
InsertRecordsRandomResponse()
Constructs an InsertRecordsRandomResponse object with default parameters.
int64_t count
Number of records to generate.
std::string tableName
Value of tableName.
A set of parameters for GPUdb::insertRecordsRandom.
std::string tableName
Table to which random records will be added, in [ schema_name.