Kùzu C++ API
Loading...
Searching...
No Matches
kuzu::common::ku_string_t Struct Reference

#include <ku_string.h>

Public Member Functions

 ku_string_t ()
 
 ku_string_t (const char *value, uint64_t length)
 
const uint8_t * getData () const
 
uint8_t * getDataUnsafe ()
 
void set (const std::string &value)
 
void set (const char *value, uint64_t length)
 
void set (const ku_string_t &value)
 
void setShortString (const char *value, uint64_t length)
 
void setLongString (const char *value, uint64_t length)
 
void setShortString (const ku_string_t &value)
 
void setLongString (const ku_string_t &value)
 
void setFromRawStr (const char *value, uint64_t length)
 
std::string getAsShortString () const
 
std::string getAsString () const
 
std::string_view getAsStringView () const
 
bool operator== (const ku_string_t &rhs) const
 
bool operator!= (const ku_string_t &rhs) const
 
bool operator> (const ku_string_t &rhs) const
 
bool operator>= (const ku_string_t &rhs) const
 
bool operator< (const ku_string_t &rhs) const
 
bool operator<= (const ku_string_t &rhs) const
 

Static Public Member Functions

static bool isShortString (uint32_t len)
 

Public Attributes

uint32_t len
 
uint8_t prefix [PREFIX_LENGTH]
 
union { 
 
   uint8_t   data [INLINED_SUFFIX_LENGTH
 
   uint64_t   overflowPtr 
 
};  
 

Static Public Attributes

static constexpr uint64_t PREFIX_LENGTH = 4
 
static constexpr uint64_t INLINED_SUFFIX_LENGTH = 8
 
static constexpr uint64_t SHORT_STR_LENGTH = PREFIX_LENGTH + INLINED_SUFFIX_LENGTH
 

Constructor & Destructor Documentation

◆ ku_string_t() [1/2]

kuzu::common::ku_string_t::ku_string_t ( )
inline

◆ ku_string_t() [2/2]

kuzu::common::ku_string_t::ku_string_t ( const char * value,
uint64_t length )

Member Function Documentation

◆ getAsShortString()

std::string kuzu::common::ku_string_t::getAsShortString ( ) const

◆ getAsString()

std::string kuzu::common::ku_string_t::getAsString ( ) const

◆ getAsStringView()

std::string_view kuzu::common::ku_string_t::getAsStringView ( ) const

◆ getData()

const uint8_t * kuzu::common::ku_string_t::getData ( ) const
inline

◆ getDataUnsafe()

uint8_t * kuzu::common::ku_string_t::getDataUnsafe ( )
inline

◆ isShortString()

static bool kuzu::common::ku_string_t::isShortString ( uint32_t len)
inlinestatic

◆ operator!=()

bool kuzu::common::ku_string_t::operator!= ( const ku_string_t & rhs) const
inline

◆ operator<()

bool kuzu::common::ku_string_t::operator< ( const ku_string_t & rhs) const
inline

◆ operator<=()

bool kuzu::common::ku_string_t::operator<= ( const ku_string_t & rhs) const
inline

◆ operator==()

bool kuzu::common::ku_string_t::operator== ( const ku_string_t & rhs) const

◆ operator>()

bool kuzu::common::ku_string_t::operator> ( const ku_string_t & rhs) const

◆ operator>=()

bool kuzu::common::ku_string_t::operator>= ( const ku_string_t & rhs) const
inline

◆ set() [1/3]

void kuzu::common::ku_string_t::set ( const char * value,
uint64_t length )

◆ set() [2/3]

void kuzu::common::ku_string_t::set ( const ku_string_t & value)

◆ set() [3/3]

void kuzu::common::ku_string_t::set ( const std::string & value)

◆ setFromRawStr()

void kuzu::common::ku_string_t::setFromRawStr ( const char * value,
uint64_t length )
inline

◆ setLongString() [1/2]

void kuzu::common::ku_string_t::setLongString ( const char * value,
uint64_t length )
inline

◆ setLongString() [2/2]

void kuzu::common::ku_string_t::setLongString ( const ku_string_t & value)
inline

◆ setShortString() [1/2]

void kuzu::common::ku_string_t::setShortString ( const char * value,
uint64_t length )
inline

◆ setShortString() [2/2]

void kuzu::common::ku_string_t::setShortString ( const ku_string_t & value)
inline

Member Data Documentation

◆ [union]

◆ data

uint8_t kuzu::common::ku_string_t::data[INLINED_SUFFIX_LENGTH]

◆ INLINED_SUFFIX_LENGTH

uint64_t kuzu::common::ku_string_t::INLINED_SUFFIX_LENGTH = 8
staticconstexpr

◆ len

uint32_t kuzu::common::ku_string_t::len

◆ overflowPtr

uint64_t kuzu::common::ku_string_t::overflowPtr

◆ prefix

uint8_t kuzu::common::ku_string_t::prefix[PREFIX_LENGTH]

◆ PREFIX_LENGTH

uint64_t kuzu::common::ku_string_t::PREFIX_LENGTH = 4
staticconstexpr

◆ SHORT_STR_LENGTH

uint64_t kuzu::common::ku_string_t::SHORT_STR_LENGTH = PREFIX_LENGTH + INLINED_SUFFIX_LENGTH
staticconstexpr

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