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