GPUdb C++ API  Version 7.2.2.4
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 
601  std::map<std::string, std::map<std::string, double> > options;
602  };
603 } // end namespace gpudb
604 
605 namespace avro
606 {
607  template<> struct codec_traits<gpudb::InsertRecordsRandomRequest>
608  {
609  static void encode(Encoder& e, const gpudb::InsertRecordsRandomRequest& v)
610  {
611  ::avro::encode(e, v.tableName);
612  ::avro::encode(e, v.count);
613  ::avro::encode(e, v.options);
614  }
615 
616  static void decode(Decoder& d, gpudb::InsertRecordsRandomRequest& v)
617  {
618  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
619  {
620  const std::vector<size_t> fo = rd->fieldOrder();
621 
622  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
623  {
624  switch (*it)
625  {
626  case 0:
627  ::avro::decode(d, v.tableName);
628  break;
629 
630  case 1:
631  ::avro::decode(d, v.count);
632  break;
633 
634  case 2:
635  ::avro::decode(d, v.options);
636  break;
637 
638  default:
639  break;
640  }
641  }
642  }
643  else
644  {
645  ::avro::decode(d, v.tableName);
646  ::avro::decode(d, v.count);
647  ::avro::decode(d, v.options);
648  }
649  }
650  };
651 } // end namespace avro
652 
653 namespace gpudb
654 {
661  {
667  tableName(std::string()),
668  count(int64_t()),
669  info(std::map<std::string, std::string>())
670  {
671  }
672 
677  std::string tableName;
678 
682  int64_t count;
683 
687  std::map<std::string, std::string> info;
688  };
689 } // end namespace gpudb
690 
691 namespace avro
692 {
693  template<> struct codec_traits<gpudb::InsertRecordsRandomResponse>
694  {
695  static void encode(Encoder& e, const gpudb::InsertRecordsRandomResponse& v)
696  {
697  ::avro::encode(e, v.tableName);
698  ::avro::encode(e, v.count);
699  ::avro::encode(e, v.info);
700  }
701 
702  static void decode(Decoder& d, gpudb::InsertRecordsRandomResponse& v)
703  {
704  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
705  {
706  const std::vector<size_t> fo = rd->fieldOrder();
707 
708  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
709  {
710  switch (*it)
711  {
712  case 0:
713  ::avro::decode(d, v.tableName);
714  break;
715 
716  case 1:
717  ::avro::decode(d, v.count);
718  break;
719 
720  case 2:
721  ::avro::decode(d, v.info);
722  break;
723 
724  default:
725  break;
726  }
727  }
728  }
729  else
730  {
731  ::avro::decode(d, v.tableName);
732  ::avro::decode(d, v.count);
733  ::avro::decode(d, v.info);
734  }
735  }
736  };
737 } // end namespace avro
738 
739 #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.