GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gpudb::GenericRecord Class Reference

#include <gpudb/GenericRecord.hpp>

Public Member Functions

 GenericRecord (const Type &type)
 Create a blank GenericRecord object from a given type. More...
 
const TypegetType () const
 
const ::avro::ValidSchema & getSchema () const
 
template<typename T >
T & value (const size_t index)
 
template<typename T >
const T & value (const size_t index) const
 
template<typename T >
T & value (const std::string &name)
 
template<typename T >
const T & value (const std::string &name) const
 
std::vector< uint8_t > & bytesValue (const size_t index)
 
const std::vector< uint8_t > & bytesValue (const size_t index) const
 
std::vector< uint8_t > & bytesValue (const std::string &name)
 
const std::vector< uint8_t > & bytesValue (const std::string &name) const
 
double & doubleValue (const size_t index)
 
const double & doubleValue (const size_t index) const
 
double & doubleValue (const std::string &name)
 
const double & doubleValue (const std::string &name) const
 
float & floatValue (const size_t index)
 
const float & floatValue (const size_t index) const
 
float & floatValue (const std::string &name)
 
const float & floatValue (const std::string &name) const
 
int32_t & intValue (const size_t index)
 
const int32_t & intValue (const size_t index) const
 
int32_t & intValue (const std::string &name)
 
const int32_t & intValue (const std::string &name) const
 
int64_t & longValue (const size_t index)
 
const int64_t & longValue (const size_t index) const
 
int64_t & longValue (const std::string &name)
 
const int64_t & longValue (const std::string &name) const
 
std::string & stringValue (const size_t index)
 
const std::string & stringValue (const size_t index) const
 
std::string & stringValue (const std::string &name)
 
const std::string & stringValue (const std::string &name) const
 
boost::optional< std::vector
< uint8_t > > & 
nullableBytesValue (const size_t index)
 
const boost::optional
< std::vector< uint8_t > > & 
nullableBytesValue (const size_t index) const
 
boost::optional< std::vector
< uint8_t > > & 
nullableBytesValue (const std::string &name)
 
const boost::optional
< std::vector< uint8_t > > & 
nullableBytesValue (const std::string &name) const
 
boost::optional< double > & nullableDoubleValue (const size_t index)
 
const boost::optional< double > & nullableDoubleValue (const size_t index) const
 
boost::optional< double > & nullableDoubleValue (const std::string &name)
 
const boost::optional< double > & nullableDoubleValue (const std::string &name) const
 
boost::optional< float > & nullableFloatValue (const size_t index)
 
const boost::optional< float > & nullableFloatValue (const size_t index) const
 
boost::optional< float > & nullableFloatValue (const std::string &name)
 
const boost::optional< float > & nullableFloatValue (const std::string &name) const
 
boost::optional< int32_t > & nullableIntValue (const size_t index)
 
const boost::optional< int32_t > & nullableIntValue (const size_t index) const
 
boost::optional< int32_t > & nullableIntValue (const std::string &name)
 
const boost::optional< int32_t > & nullableIntValue (const std::string &name) const
 
boost::optional< int64_t > & nullableLongValue (const size_t index)
 
const boost::optional< int64_t > & nullableLongValue (const size_t index) const
 
boost::optional< int64_t > & nullableLongValue (const std::string &name)
 
const boost::optional< int64_t > & nullableLongValue (const std::string &name) const
 
boost::optional< std::string > & nullableStringValue (const size_t index)
 
const boost::optional
< std::string > & 
nullableStringValue (const size_t index) const
 
boost::optional< std::string > & nullableStringValue (const std::string &name)
 
const boost::optional
< std::string > & 
nullableStringValue (const std::string &name) const
 
bool isNull (const size_t index) const
 
bool isNull (const std::string &name) const
 
void getAsBytes (const size_t index, std::vector< uint8_t > &result) const
 
void getAsBytes (const std::string &name, std::vector< uint8_t > &result) const
 
std::vector< uint8_t > getAsBytes (const size_t index) const
 
std::vector< uint8_t > getAsBytes (const std::string &name) const
 
void getAsDouble (const size_t index, double &result) const
 
void getAsDouble (const std::string &name, double &result) const
 
double getAsDouble (const size_t index) const
 
double getAsDouble (const std::string &name) const
 
void getAsFloat (const size_t index, float &result) const
 
void getAsFloat (const std::string &name, float &result) const
 
float getAsFloat (const size_t index) const
 
float getAsFloat (const std::string &name) const
 
void getAsInt (const size_t index, int32_t &result) const
 
void getAsInt (const std::string &name, int32_t &result) const
 
int32_t getAsInt (const size_t index) const
 
int32_t getAsInt (const std::string &name) const
 
void getAsLong (const size_t index, int64_t &result) const
 
void getAsLong (const std::string &name, int64_t &result) const
 
int64_t getAsLong (const size_t index) const
 
int64_t getAsLong (const std::string &name) const
 
void getAsString (const size_t index, std::string &result) const
 
void getAsString (const std::string &name, std::string &result) const
 
std::string getAsString (const size_t index) const
 
std::string getAsString (const std::string &name) const
 
void getAsNullableBytes (const size_t index, boost::optional< std::vector< uint8_t > > &result) const
 
void getAsNullableBytes (const std::string &name, boost::optional< std::vector< uint8_t > > &result) const
 
boost::optional< std::vector
< uint8_t > > 
getAsNullableBytes (const size_t index) const
 
boost::optional< std::vector
< uint8_t > > 
getAsNullableBytes (const std::string &name) const
 
void getAsNullableDouble (const size_t index, boost::optional< double > &result) const
 
void getAsNullableDouble (const std::string &name, boost::optional< double > &result) const
 
boost::optional< double > getAsNullableDouble (const size_t index) const
 
boost::optional< double > getAsNullableDouble (const std::string &name) const
 
void getAsNullableFloat (const size_t index, boost::optional< float > &result) const
 
void getAsNullableFloat (const std::string &name, boost::optional< float > &result) const
 
boost::optional< float > getAsNullableFloat (const size_t index) const
 
boost::optional< float > getAsNullableFloat (const std::string &name) const
 
void getAsNullableInt (const size_t index, boost::optional< int32_t > &result) const
 
void getAsNullableInt (const std::string &name, boost::optional< int32_t > &result) const
 
boost::optional< int32_t > getAsNullableInt (const size_t index) const
 
boost::optional< int32_t > getAsNullableInt (const std::string &name) const
 
void getAsNullableLong (const size_t index, boost::optional< int64_t > &result) const
 
void getAsNullableLong (const std::string &name, boost::optional< int64_t > &result) const
 
boost::optional< int64_t > getAsNullableLong (const size_t index) const
 
boost::optional< int64_t > getAsNullableLong (const std::string &name) const
 
void getAsNullableString (const size_t index, boost::optional< std::string > &result) const
 
void getAsNullableString (const std::string &name, boost::optional< std::string > &result) const
 
boost::optional< std::string > getAsNullableString (const size_t index) const
 
boost::optional< std::string > getAsNullableString (const std::string &name) const
 
void setNull (const size_t index)
 
void setNull (const std::string &name)
 
void setAsBytes (const size_t index, const std::vector< uint8_t > &newValue)
 
void setAsBytes (const std::string &name, const std::vector< uint8_t > &newValue)
 
void setAsDouble (const size_t index, const double &newValue)
 
void setAsDouble (const std::string &name, const double &newValue)
 
void setAsFloat (const size_t index, const float &newValue)
 
void setAsFloat (const std::string &name, const float &newValue)
 
void setAsInt (const size_t index, const int32_t &newValue)
 
void setAsInt (const std::string &name, const int32_t &newValue)
 
void setAsLong (const size_t index, const int64_t &newValue)
 
void setAsLong (const std::string &name, const int64_t &newValue)
 
void setAsString (const size_t index, const std::string &newValue)
 
void setAsString (const std::string &name, const std::string &newValue)
 
void setAsNullableBytes (const size_t index, const boost::optional< std::vector< uint8_t > > &newValue)
 
void setAsNullableBytes (const std::string &name, const boost::optional< std::vector< uint8_t > > &newValue)
 
void setAsNullableDouble (const size_t index, const boost::optional< double > &newValue)
 
void setAsNullableDouble (const std::string &name, const boost::optional< double > &newValue)
 
void setAsNullableFloat (const size_t index, const boost::optional< float > &newValue)
 
void setAsNullableFloat (const std::string &name, const boost::optional< float > &newValue)
 
void setAsNullableInt (const size_t index, const boost::optional< int32_t > &newValue)
 
void setAsNullableInt (const std::string &name, const boost::optional< int32_t > &newValue)
 
void setAsNullableLong (const size_t index, const boost::optional< int64_t > &newValue)
 
void setAsNullableLong (const std::string &name, const boost::optional< int64_t > &newValue)
 
void setAsNullableString (const size_t index, const boost::optional< std::string > &newValue)
 
void setAsNullableString (const std::string &name, const boost::optional< std::string > &newValue)
 
void toString (const size_t index, std::string &result) const
 
void toString (const std::string &name, std::string &result) const
 
std::string toString (const size_t index) const
 
std::string toString (const std::string &name) const
 

Static Public Member Functions

static void decode (const std::string &schemaString, const std::vector< std::vector< uint8_t > > &encodedData, std::vector< GenericRecord > &data)
 Decodes avro encoded data (given the schema string) into GenericRecord objects. More...
 
static void decode (const std::string &schemaString, const std::vector< uint8_t > &encodedData, GenericRecord &data)
 Decodes avro encoded data (given the schema string) into GenericRecord objects. More...
 

Friends

class GPUdb
 
std::ostream & operator<< (std::ostream &os, GenericRecord &gr)
 
std::ostream & operator<< (std::ostream &os, const GenericRecord &gr)
 

Detailed Description

Definition at line 17 of file GenericRecord.hpp.

Constructor & Destructor Documentation

gpudb::GenericRecord::GenericRecord ( const Type type)

Create a blank GenericRecord object from a given type.

Member Function Documentation

std::vector<uint8_t>& gpudb::GenericRecord::bytesValue ( const size_t  index)
const std::vector<uint8_t>& gpudb::GenericRecord::bytesValue ( const size_t  index) const
std::vector<uint8_t>& gpudb::GenericRecord::bytesValue ( const std::string &  name)
const std::vector<uint8_t>& gpudb::GenericRecord::bytesValue ( const std::string &  name) const
static void gpudb::GenericRecord::decode ( const std::string &  schemaString,
const std::vector< std::vector< uint8_t > > &  encodedData,
std::vector< GenericRecord > &  data 
)
static

Decodes avro encoded data (given the schema string) into GenericRecord objects.

Parameters
[in]schemaStringAvro schema string used for decoding the data
[in]encodedDataAvro encoded binary data containing multiple records.
[out]dataVector of decoded GenericRecord objects. The vector is cleared before operation begins.
static void gpudb::GenericRecord::decode ( const std::string &  schemaString,
const std::vector< uint8_t > &  encodedData,
GenericRecord data 
)
static

Decodes avro encoded data (given the schema string) into GenericRecord objects.

Parameters
[in]schemaStringAvro schema string used for decoding the data
[in]encodedDataAvro encoded binary data containing a single record.
[out]dataA decoded GenericRecord object
double& gpudb::GenericRecord::doubleValue ( const size_t  index)
const double& gpudb::GenericRecord::doubleValue ( const size_t  index) const
double& gpudb::GenericRecord::doubleValue ( const std::string &  name)
const double& gpudb::GenericRecord::doubleValue ( const std::string &  name) const
float& gpudb::GenericRecord::floatValue ( const size_t  index)
const float& gpudb::GenericRecord::floatValue ( const size_t  index) const
float& gpudb::GenericRecord::floatValue ( const std::string &  name)
const float& gpudb::GenericRecord::floatValue ( const std::string &  name) const
void gpudb::GenericRecord::getAsBytes ( const size_t  index,
std::vector< uint8_t > &  result 
) const
void gpudb::GenericRecord::getAsBytes ( const std::string &  name,
std::vector< uint8_t > &  result 
) const
std::vector<uint8_t> gpudb::GenericRecord::getAsBytes ( const size_t  index) const
std::vector<uint8_t> gpudb::GenericRecord::getAsBytes ( const std::string &  name) const
void gpudb::GenericRecord::getAsDouble ( const size_t  index,
double &  result 
) const
void gpudb::GenericRecord::getAsDouble ( const std::string &  name,
double &  result 
) const
double gpudb::GenericRecord::getAsDouble ( const size_t  index) const
double gpudb::GenericRecord::getAsDouble ( const std::string &  name) const
void gpudb::GenericRecord::getAsFloat ( const size_t  index,
float &  result 
) const
void gpudb::GenericRecord::getAsFloat ( const std::string &  name,
float &  result 
) const
float gpudb::GenericRecord::getAsFloat ( const size_t  index) const
float gpudb::GenericRecord::getAsFloat ( const std::string &  name) const
void gpudb::GenericRecord::getAsInt ( const size_t  index,
int32_t &  result 
) const
void gpudb::GenericRecord::getAsInt ( const std::string &  name,
int32_t &  result 
) const
int32_t gpudb::GenericRecord::getAsInt ( const size_t  index) const
int32_t gpudb::GenericRecord::getAsInt ( const std::string &  name) const
void gpudb::GenericRecord::getAsLong ( const size_t  index,
int64_t &  result 
) const
void gpudb::GenericRecord::getAsLong ( const std::string &  name,
int64_t &  result 
) const
int64_t gpudb::GenericRecord::getAsLong ( const size_t  index) const
int64_t gpudb::GenericRecord::getAsLong ( const std::string &  name) const
void gpudb::GenericRecord::getAsNullableBytes ( const size_t  index,
boost::optional< std::vector< uint8_t > > &  result 
) const
void gpudb::GenericRecord::getAsNullableBytes ( const std::string &  name,
boost::optional< std::vector< uint8_t > > &  result 
) const
boost::optional<std::vector<uint8_t> > gpudb::GenericRecord::getAsNullableBytes ( const size_t  index) const
boost::optional<std::vector<uint8_t> > gpudb::GenericRecord::getAsNullableBytes ( const std::string &  name) const
void gpudb::GenericRecord::getAsNullableDouble ( const size_t  index,
boost::optional< double > &  result 
) const
void gpudb::GenericRecord::getAsNullableDouble ( const std::string &  name,
boost::optional< double > &  result 
) const
boost::optional<double> gpudb::GenericRecord::getAsNullableDouble ( const size_t  index) const
boost::optional<double> gpudb::GenericRecord::getAsNullableDouble ( const std::string &  name) const
void gpudb::GenericRecord::getAsNullableFloat ( const size_t  index,
boost::optional< float > &  result 
) const
void gpudb::GenericRecord::getAsNullableFloat ( const std::string &  name,
boost::optional< float > &  result 
) const
boost::optional<float> gpudb::GenericRecord::getAsNullableFloat ( const size_t  index) const
boost::optional<float> gpudb::GenericRecord::getAsNullableFloat ( const std::string &  name) const
void gpudb::GenericRecord::getAsNullableInt ( const size_t  index,
boost::optional< int32_t > &  result 
) const
void gpudb::GenericRecord::getAsNullableInt ( const std::string &  name,
boost::optional< int32_t > &  result 
) const
boost::optional<int32_t> gpudb::GenericRecord::getAsNullableInt ( const size_t  index) const
boost::optional<int32_t> gpudb::GenericRecord::getAsNullableInt ( const std::string &  name) const
void gpudb::GenericRecord::getAsNullableLong ( const size_t  index,
boost::optional< int64_t > &  result 
) const
void gpudb::GenericRecord::getAsNullableLong ( const std::string &  name,
boost::optional< int64_t > &  result 
) const
boost::optional<int64_t> gpudb::GenericRecord::getAsNullableLong ( const size_t  index) const
boost::optional<int64_t> gpudb::GenericRecord::getAsNullableLong ( const std::string &  name) const
void gpudb::GenericRecord::getAsNullableString ( const size_t  index,
boost::optional< std::string > &  result 
) const
void gpudb::GenericRecord::getAsNullableString ( const std::string &  name,
boost::optional< std::string > &  result 
) const
boost::optional<std::string> gpudb::GenericRecord::getAsNullableString ( const size_t  index) const
boost::optional<std::string> gpudb::GenericRecord::getAsNullableString ( const std::string &  name) const
void gpudb::GenericRecord::getAsString ( const size_t  index,
std::string &  result 
) const
void gpudb::GenericRecord::getAsString ( const std::string &  name,
std::string &  result 
) const
std::string gpudb::GenericRecord::getAsString ( const size_t  index) const
std::string gpudb::GenericRecord::getAsString ( const std::string &  name) const
const ::avro::ValidSchema& gpudb::GenericRecord::getSchema ( ) const
const Type& gpudb::GenericRecord::getType ( ) const
int32_t& gpudb::GenericRecord::intValue ( const size_t  index)
const int32_t& gpudb::GenericRecord::intValue ( const size_t  index) const
int32_t& gpudb::GenericRecord::intValue ( const std::string &  name)
const int32_t& gpudb::GenericRecord::intValue ( const std::string &  name) const
bool gpudb::GenericRecord::isNull ( const size_t  index) const
bool gpudb::GenericRecord::isNull ( const std::string &  name) const
int64_t& gpudb::GenericRecord::longValue ( const size_t  index)
const int64_t& gpudb::GenericRecord::longValue ( const size_t  index) const
int64_t& gpudb::GenericRecord::longValue ( const std::string &  name)
const int64_t& gpudb::GenericRecord::longValue ( const std::string &  name) const
boost::optional<std::vector<uint8_t> >& gpudb::GenericRecord::nullableBytesValue ( const size_t  index)
const boost::optional<std::vector<uint8_t> >& gpudb::GenericRecord::nullableBytesValue ( const size_t  index) const
boost::optional<std::vector<uint8_t> >& gpudb::GenericRecord::nullableBytesValue ( const std::string &  name)
const boost::optional<std::vector<uint8_t> >& gpudb::GenericRecord::nullableBytesValue ( const std::string &  name) const
boost::optional<double>& gpudb::GenericRecord::nullableDoubleValue ( const size_t  index)
const boost::optional<double>& gpudb::GenericRecord::nullableDoubleValue ( const size_t  index) const
boost::optional<double>& gpudb::GenericRecord::nullableDoubleValue ( const std::string &  name)
const boost::optional<double>& gpudb::GenericRecord::nullableDoubleValue ( const std::string &  name) const
boost::optional<float>& gpudb::GenericRecord::nullableFloatValue ( const size_t  index)
const boost::optional<float>& gpudb::GenericRecord::nullableFloatValue ( const size_t  index) const
boost::optional<float>& gpudb::GenericRecord::nullableFloatValue ( const std::string &  name)
const boost::optional<float>& gpudb::GenericRecord::nullableFloatValue ( const std::string &  name) const
boost::optional<int32_t>& gpudb::GenericRecord::nullableIntValue ( const size_t  index)
const boost::optional<int32_t>& gpudb::GenericRecord::nullableIntValue ( const size_t  index) const
boost::optional<int32_t>& gpudb::GenericRecord::nullableIntValue ( const std::string &  name)
const boost::optional<int32_t>& gpudb::GenericRecord::nullableIntValue ( const std::string &  name) const
boost::optional<int64_t>& gpudb::GenericRecord::nullableLongValue ( const size_t  index)
const boost::optional<int64_t>& gpudb::GenericRecord::nullableLongValue ( const size_t  index) const
boost::optional<int64_t>& gpudb::GenericRecord::nullableLongValue ( const std::string &  name)
const boost::optional<int64_t>& gpudb::GenericRecord::nullableLongValue ( const std::string &  name) const
boost::optional<std::string>& gpudb::GenericRecord::nullableStringValue ( const size_t  index)
const boost::optional<std::string>& gpudb::GenericRecord::nullableStringValue ( const size_t  index) const
boost::optional<std::string>& gpudb::GenericRecord::nullableStringValue ( const std::string &  name)
const boost::optional<std::string>& gpudb::GenericRecord::nullableStringValue ( const std::string &  name) const
void gpudb::GenericRecord::setAsBytes ( const size_t  index,
const std::vector< uint8_t > &  newValue 
)
void gpudb::GenericRecord::setAsBytes ( const std::string &  name,
const std::vector< uint8_t > &  newValue 
)
void gpudb::GenericRecord::setAsDouble ( const size_t  index,
const double &  newValue 
)
void gpudb::GenericRecord::setAsDouble ( const std::string &  name,
const double &  newValue 
)
void gpudb::GenericRecord::setAsFloat ( const size_t  index,
const float &  newValue 
)
void gpudb::GenericRecord::setAsFloat ( const std::string &  name,
const float &  newValue 
)
void gpudb::GenericRecord::setAsInt ( const size_t  index,
const int32_t &  newValue 
)
void gpudb::GenericRecord::setAsInt ( const std::string &  name,
const int32_t &  newValue 
)
void gpudb::GenericRecord::setAsLong ( const size_t  index,
const int64_t &  newValue 
)
void gpudb::GenericRecord::setAsLong ( const std::string &  name,
const int64_t &  newValue 
)
void gpudb::GenericRecord::setAsNullableBytes ( const size_t  index,
const boost::optional< std::vector< uint8_t > > &  newValue 
)
void gpudb::GenericRecord::setAsNullableBytes ( const std::string &  name,
const boost::optional< std::vector< uint8_t > > &  newValue 
)
void gpudb::GenericRecord::setAsNullableDouble ( const size_t  index,
const boost::optional< double > &  newValue 
)
void gpudb::GenericRecord::setAsNullableDouble ( const std::string &  name,
const boost::optional< double > &  newValue 
)
void gpudb::GenericRecord::setAsNullableFloat ( const size_t  index,
const boost::optional< float > &  newValue 
)
void gpudb::GenericRecord::setAsNullableFloat ( const std::string &  name,
const boost::optional< float > &  newValue 
)
void gpudb::GenericRecord::setAsNullableInt ( const size_t  index,
const boost::optional< int32_t > &  newValue 
)
void gpudb::GenericRecord::setAsNullableInt ( const std::string &  name,
const boost::optional< int32_t > &  newValue 
)
void gpudb::GenericRecord::setAsNullableLong ( const size_t  index,
const boost::optional< int64_t > &  newValue 
)
void gpudb::GenericRecord::setAsNullableLong ( const std::string &  name,
const boost::optional< int64_t > &  newValue 
)
void gpudb::GenericRecord::setAsNullableString ( const size_t  index,
const boost::optional< std::string > &  newValue 
)
void gpudb::GenericRecord::setAsNullableString ( const std::string &  name,
const boost::optional< std::string > &  newValue 
)
void gpudb::GenericRecord::setAsString ( const size_t  index,
const std::string &  newValue 
)
void gpudb::GenericRecord::setAsString ( const std::string &  name,
const std::string &  newValue 
)
void gpudb::GenericRecord::setNull ( const size_t  index)
void gpudb::GenericRecord::setNull ( const std::string &  name)
std::string& gpudb::GenericRecord::stringValue ( const size_t  index)
const std::string& gpudb::GenericRecord::stringValue ( const size_t  index) const
std::string& gpudb::GenericRecord::stringValue ( const std::string &  name)
const std::string& gpudb::GenericRecord::stringValue ( const std::string &  name) const
void gpudb::GenericRecord::toString ( const size_t  index,
std::string &  result 
) const
void gpudb::GenericRecord::toString ( const std::string &  name,
std::string &  result 
) const
std::string gpudb::GenericRecord::toString ( const size_t  index) const
std::string gpudb::GenericRecord::toString ( const std::string &  name) const
template<typename T >
T& gpudb::GenericRecord::value ( const size_t  index)
inline

Definition at line 30 of file GenericRecord.hpp.

template<typename T >
const T& gpudb::GenericRecord::value ( const size_t  index) const
inline

Definition at line 37 of file GenericRecord.hpp.

template<typename T >
T& gpudb::GenericRecord::value ( const std::string &  name)
inline

Definition at line 44 of file GenericRecord.hpp.

template<typename T >
const T& gpudb::GenericRecord::value ( const std::string &  name) const
inline

Definition at line 51 of file GenericRecord.hpp.

Friends And Related Function Documentation

friend class GPUdb
friend

Definition at line 19 of file GenericRecord.hpp.

std::ostream& operator<< ( std::ostream &  os,
GenericRecord gr 
)
friend
std::ostream& operator<< ( std::ostream &  os,
const GenericRecord gr 
)
friend

The documentation for this class was generated from the following file: