GPUdb C++ API  Version 6.2.0.3
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 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
 

Detailed Description

Definition at line 101 of file GPUdbMultiHeadIOUtils.h.

Constructor & Destructor Documentation

◆ RecordKey() [1/3]

gpudb::RecordKey::RecordKey ( )

◆ RecordKey() [2/3]

gpudb::RecordKey::RecordKey ( size_t  buffer_size)

◆ RecordKey() [3/3]

gpudb::RecordKey::RecordKey ( const RecordKey other)

◆ ~RecordKey()

gpudb::RecordKey::~RecordKey ( )

Member Function Documentation

◆ add_char1()

void gpudb::RecordKey::add_char1 ( const std::string &  value,
bool  is_null 
)

◆ add_char128()

void gpudb::RecordKey::add_char128 ( const std::string &  value,
bool  is_null 
)

◆ add_char16()

void gpudb::RecordKey::add_char16 ( const std::string &  value,
bool  is_null 
)

◆ add_char2()

void gpudb::RecordKey::add_char2 ( const std::string &  value,
bool  is_null 
)

◆ add_char256()

void gpudb::RecordKey::add_char256 ( const std::string &  value,
bool  is_null 
)

◆ add_char32()

void gpudb::RecordKey::add_char32 ( const std::string &  value,
bool  is_null 
)

◆ add_char4()

void gpudb::RecordKey::add_char4 ( const std::string &  value,
bool  is_null 
)

◆ add_char64()

void gpudb::RecordKey::add_char64 ( const std::string &  value,
bool  is_null 
)

◆ add_char8()

void gpudb::RecordKey::add_char8 ( const std::string &  value,
bool  is_null 
)

◆ add_date()

void gpudb::RecordKey::add_date ( const std::string &  value,
bool  is_null 
)

◆ add_datetime()

void gpudb::RecordKey::add_datetime ( const std::string &  value,
bool  is_null 
)

◆ add_decimal()

void gpudb::RecordKey::add_decimal ( const std::string &  value,
bool  is_null 
)

◆ add_double()

void gpudb::RecordKey::add_double ( double  value,
bool  is_null 
)

◆ add_float()

void gpudb::RecordKey::add_float ( float  value,
bool  is_null 
)

◆ add_int()

void gpudb::RecordKey::add_int ( int32_t  value,
bool  is_null 
)

◆ add_int16()

void gpudb::RecordKey::add_int16 ( int16_t  value,
bool  is_null 
)

◆ add_int8()

void gpudb::RecordKey::add_int8 ( int8_t  value,
bool  is_null 
)

◆ add_ipv4()

void gpudb::RecordKey::add_ipv4 ( const std::string &  value,
bool  is_null 
)

◆ add_long()

void gpudb::RecordKey::add_long ( int64_t  value,
bool  is_null 
)

◆ add_string()

void gpudb::RecordKey::add_string ( const std::string &  value,
bool  is_null 
)

◆ add_time()

void gpudb::RecordKey::add_time ( const std::string &  value,
bool  is_null 
)

◆ add_timestamp()

void gpudb::RecordKey::add_timestamp ( int64_t  value,
bool  is_null 
)

◆ compute_hash()

void gpudb::RecordKey::compute_hash ( )

Compute the hash of the key in the buffer.

◆ get_hash_code()

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

Definition at line 114 of file GPUdbMultiHeadIOUtils.h.

◆ is_valid()

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

Definition at line 111 of file GPUdbMultiHeadIOUtils.h.

◆ operator!=()

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

Definition at line 199 of file GPUdbMultiHeadIOUtils.h.

◆ operator<()

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

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

◆ operator=()

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

The assignment operator.

◆ operator==()

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

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

◆ operator>()

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

Definition at line 203 of file GPUdbMultiHeadIOUtils.h.

◆ reset()

void gpudb::RecordKey::reset ( size_t  buffer_size)

◆ route()

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.

◆ toString()

std::string gpudb::RecordKey::toString ( const std::string &  separator = " ") const

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