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

#include <gpudb/utils/GPUdbMultiHeadIOUtils.h>

Public Member Functions

 RecordKey ()
 
 RecordKey (size_t buffer_size)
 
 RecordKey (const RecordKey &other)
 
 ~RecordKey ()
 
bool is_valid () const
 
int32_t get_hash_code () const
 
void reset (size_t buffer_size)
 
void add_char1 (const std::string &value, bool is_null)
 
void add_char2 (const std::string &value, bool is_null)
 
void add_char4 (const std::string &value, bool is_null)
 
void add_char8 (const std::string &value, bool is_null)
 
void add_char16 (const std::string &value, bool is_null)
 
void add_char32 (const std::string &value, bool is_null)
 
void add_char64 (const std::string &value, bool is_null)
 
void add_char128 (const std::string &value, bool is_null)
 
void add_char256 (const std::string &value, bool is_null)
 
void add_date (const std::string &value, bool is_null)
 
void add_datetime (const std::string &value, bool is_null)
 
void add_decimal (const std::string &value, bool is_null)
 
void add_double (double value, bool is_null)
 
void add_float (float value, bool is_null)
 
void add_int8 (int8_t value, bool is_null)
 
void add_int16 (int16_t value, bool is_null)
 
void add_int (int32_t value, bool is_null)
 
void add_ipv4 (const std::string &value, bool is_null)
 
void add_long (int64_t value, bool is_null)
 
void add_time (const std::string &value, bool is_null)
 
void add_timestamp (int64_t value, bool is_null)
 
void add_string (const std::string &value, bool is_null)
 
void add_ulong (const std::string &value, bool is_null)
 
void compute_hash ()
 Compute the hash of the key in the buffer. More...
 
size_t route (const std::vector< int32_t > &routing_table) const
 Given a routing table consisting of worker rank indices, choose a worker rank based on the hash of the record key. More...
 
RecordKeyoperator= (const RecordKey &other)
 The assignment operator. More...
 
bool operator== (const RecordKey &rhs) const
 Returns true if the other RecordKey is equivalent to this key. More...
 
bool operator!= (const RecordKey &rhs) const
 
bool operator< (const RecordKey &rhs) const
 Returns true if this RecordKey is less than the other key. More...
 
bool operator> (const RecordKey &rhs) const
 
std::string toString (const std::string &separator=" ") const
 

Static Public Member Functions

static bool verify_ulong_value (const std::string &value)
 A static utility function for verifying if a given string is a valid. More...
 

Detailed Description

Definition at line 101 of file GPUdbMultiHeadIOUtils.h.

Constructor & Destructor Documentation

gpudb::RecordKey::RecordKey ( )
gpudb::RecordKey::RecordKey ( size_t  buffer_size)
gpudb::RecordKey::RecordKey ( const RecordKey other)
gpudb::RecordKey::~RecordKey ( )

Member Function Documentation

void gpudb::RecordKey::add_char1 ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_char128 ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_char16 ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_char2 ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_char256 ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_char32 ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_char4 ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_char64 ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_char8 ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_date ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_datetime ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_decimal ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_double ( double  value,
bool  is_null 
)
void gpudb::RecordKey::add_float ( float  value,
bool  is_null 
)
void gpudb::RecordKey::add_int ( int32_t  value,
bool  is_null 
)
void gpudb::RecordKey::add_int16 ( int16_t  value,
bool  is_null 
)
void gpudb::RecordKey::add_int8 ( int8_t  value,
bool  is_null 
)
void gpudb::RecordKey::add_ipv4 ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_long ( int64_t  value,
bool  is_null 
)
void gpudb::RecordKey::add_string ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_time ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::add_timestamp ( int64_t  value,
bool  is_null 
)
void gpudb::RecordKey::add_ulong ( const std::string &  value,
bool  is_null 
)
void gpudb::RecordKey::compute_hash ( )

Compute the hash of the key in the buffer.

int32_t gpudb::RecordKey::get_hash_code ( ) const
inline

Definition at line 114 of file GPUdbMultiHeadIOUtils.h.

bool gpudb::RecordKey::is_valid ( ) const
inline

Definition at line 111 of file GPUdbMultiHeadIOUtils.h.

bool gpudb::RecordKey::operator!= ( const RecordKey rhs) const
inline

Definition at line 206 of file GPUdbMultiHeadIOUtils.h.

bool gpudb::RecordKey::operator< ( const RecordKey rhs) const

Returns true if this RecordKey is less than the other key.

RecordKey& gpudb::RecordKey::operator= ( const RecordKey other)

The assignment operator.

bool gpudb::RecordKey::operator== ( const RecordKey rhs) const

Returns true if the other RecordKey is equivalent to this key.

bool gpudb::RecordKey::operator> ( const RecordKey rhs) const
inline

Definition at line 210 of file GPUdbMultiHeadIOUtils.h.

void gpudb::RecordKey::reset ( size_t  buffer_size)
size_t gpudb::RecordKey::route ( const std::vector< int32_t > &  routing_table) const

Given a routing table consisting of worker rank indices, choose a worker rank based on the hash of the record key.

std::string gpudb::RecordKey::toString ( const std::string &  separator = " ") const
static bool gpudb::RecordKey::verify_ulong_value ( const std::string &  value)
static

A static utility function for verifying if a given string is a valid.


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