SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::DB::Specs::Value Class Reference

#include <swcdb/db/Cells/SpecsValue.h>

+ Collaboration diagram for SWC::DB::Specs::Value:

Classes

struct  TypeMatcher
 

Public Member Functions

constexpr SWC_CAN_INLINE Value (Condition::Comp a_comp=Condition::NONE) noexcept
 
SWC_CAN_INLINE Value (const char *data_n, Condition::Comp comp_n, bool owner)
 
SWC_CAN_INLINE Value (const char *data_n, const uint32_t size_n, Condition::Comp comp_n, bool owner)
 
SWC_CAN_INLINE Value (const uint8_t *data_n, const uint32_t size_n, Condition::Comp comp_n, bool owner)
 
SWC_CAN_INLINE Value (int64_t count, Condition::Comp comp_n)
 
SWC_CAN_INLINE Value (const uint8_t **bufp, size_t *remainp, bool owner)
 
SWC_CAN_INLINE Value (const Value &other)
 
constexpr SWC_CAN_INLINE Value (Value &&other) noexcept
 
SWC_CAN_INLINE Valueoperator= (const Value &other)
 
SWC_CAN_INLINE Valueoperator= (Value &&other) noexcept
 
SWC_CAN_INLINE void copy (const Value &other)
 
SWC_CAN_INLINE void set (const char *data_n, Condition::Comp comp_n, bool owner)
 
SWC_CAN_INLINE void set (const std::string &data_n, Condition::Comp comp_n)
 
SWC_CAN_INLINE void set (const char *data_n, uint32_t size_n, Condition::Comp comp_n, bool owner)
 
void move (Value &other) noexcept
 
void set_counter (int64_t count, Condition::Comp comp_n)
 
void set (const uint8_t *data_n, const uint32_t size_n, Condition::Comp comp_n, bool owner)
 
 ~Value () noexcept
 
SWC_CAN_INLINE void _free () noexcept
 
SWC_CAN_INLINE void free () noexcept
 
constexpr SWC_CAN_INLINE bool empty () const noexcept
 
constexpr bool equal (const Value &other) const noexcept
 
constexpr SWC_CAN_INLINE size_t encoded_length () const noexcept
 
SWC_CAN_INLINE void encode (uint8_t **bufp) const
 
SWC_CAN_INLINE void decode (const uint8_t **bufp, size_t *remainp, bool owner)
 
SWC_CAN_INLINE bool is_matching (Types::Column col_type, const Cells::Cell &cell) const
 
bool is_matching_plain (const Cells::Cell &cell) const
 
bool is_matching_serial (const Cells::Cell &cell) const
 
bool is_matching_counter (const Cells::Cell &cell) const
 
SWC_CAN_INLINE std::string to_string (Types::Column col_type) const
 
void print (Types::Column col_type, std::ostream &out) const
 
void display (Types::Column col_type, std::ostream &out, bool pretty=true) const
 

Public Attributes

bool own
 
Condition::Comp comp
 
uint32_t size
 
uint8_t * data
 

Private Attributes

TypeMatchermatcher
 

Detailed Description

Definition at line 17 of file SpecsValue.h.

Constructor & Destructor Documentation

◆ Value() [1/8]

constexpr SWC_CAN_INLINE SWC::DB::Specs::Value::Value ( Condition::Comp  a_comp = Condition::NONE)
inlineexplicitconstexprnoexcept

Definition at line 21 of file SpecsValue.h.

◆ Value() [2/8]

SWC_CAN_INLINE SWC::DB::Specs::Value::Value ( const char *  data_n,
Condition::Comp  comp_n,
bool  owner 
)
inlineexplicit

Definition at line 27 of file SpecsValue.h.

References set().

+ Here is the call graph for this function:

◆ Value() [3/8]

SWC_CAN_INLINE SWC::DB::Specs::Value::Value ( const char *  data_n,
const uint32_t  size_n,
Condition::Comp  comp_n,
bool  owner 
)
inlineexplicit

Definition at line 36 of file SpecsValue.h.

References set().

+ Here is the call graph for this function:

◆ Value() [4/8]

SWC_CAN_INLINE SWC::DB::Specs::Value::Value ( const uint8_t *  data_n,
const uint32_t  size_n,
Condition::Comp  comp_n,
bool  owner 
)
inlineexplicit

Definition at line 45 of file SpecsValue.h.

References set().

+ Here is the call graph for this function:

◆ Value() [5/8]

SWC_CAN_INLINE SWC::DB::Specs::Value::Value ( int64_t  count,
Condition::Comp  comp_n 
)
inlineexplicit

Definition at line 54 of file SpecsValue.h.

References set_counter().

+ Here is the call graph for this function:

◆ Value() [6/8]

SWC_CAN_INLINE SWC::DB::Specs::Value::Value ( const uint8_t **  bufp,
size_t *  remainp,
bool  owner 
)
inlineexplicit

Definition at line 62 of file SpecsValue.h.

References size.

◆ Value() [7/8]

SWC_CAN_INLINE SWC::DB::Specs::Value::Value ( const Value other)
inlineexplicit

Definition at line 83 of file SpecsValue.h.

◆ Value() [8/8]

constexpr SWC_CAN_INLINE SWC::DB::Specs::Value::Value ( Value &&  other)
inlineexplicitconstexprnoexcept

Definition at line 96 of file SpecsValue.h.

References SWC::Condition::NONE.

◆ ~Value()

SWC::DB::Specs::Value::~Value ( )
inlinenoexcept

Definition at line 146 of file SpecsValue.h.

References _free().

+ Here is the call graph for this function:

Member Function Documentation

◆ _free()

SWC_CAN_INLINE void SWC::DB::Specs::Value::_free ( )
inlinenoexcept

Definition at line 151 of file SpecsValue.h.

References data, matcher, and own.

Referenced by free(), and ~Value().

+ Here is the caller graph for this function:

◆ copy()

SWC_CAN_INLINE void SWC::DB::Specs::Value::copy ( const Value other)
inline

Definition at line 119 of file SpecsValue.h.

References comp, data, set(), and size.

Referenced by operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ decode()

SWC_CAN_INLINE void SWC::DB::Specs::Value::decode ( const uint8_t **  bufp,
size_t *  remainp,
bool  owner 
)
inline

Definition at line 194 of file SpecsValue.h.

References comp, data, SWC::Serialization::decode_i8(), SWC::Serialization::decode_vi32(), free(), SWC::Condition::NONE, own, and size.

+ Here is the call graph for this function:

◆ display()

void SWC::DB::Specs::Value::display ( Types::Column  col_type,
std::ostream &  out,
bool  pretty = true 
) const

Definition at line 96 of file SpecsValue.cc.

References comp, data, SWC::DB::Specs::Serial::Value::Fields::print(), SWC::DB::Types::SERIAL, size, and SWC::Condition::to_string().

Referenced by print().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ empty()

constexpr SWC_CAN_INLINE bool SWC::DB::Specs::Value::empty ( ) const
inlineconstexprnoexcept

Definition at line 166 of file SpecsValue.h.

References comp, and SWC::Condition::NONE.

Referenced by is_matching_counter(), is_matching_plain(), and is_matching_serial().

+ Here is the caller graph for this function:

◆ encode()

SWC_CAN_INLINE void SWC::DB::Specs::Value::encode ( uint8_t **  bufp) const
inline

Definition at line 184 of file SpecsValue.h.

References comp, data, SWC::Serialization::encode_i8(), SWC::Serialization::encode_vi32(), SWC::Condition::NONE, and size.

+ Here is the call graph for this function:

◆ encoded_length()

constexpr SWC_CAN_INLINE size_t SWC::DB::Specs::Value::encoded_length ( ) const
inlineconstexprnoexcept

Definition at line 174 of file SpecsValue.h.

References comp, SWC::Serialization::encoded_length_vi32(), SWC::Condition::NONE, and size.

+ Here is the call graph for this function:

◆ equal()

constexpr SWC_CAN_INLINE bool SWC::DB::Specs::Value::equal ( const Value other) const
constexprnoexcept

Definition at line 299 of file SpecsValue.h.

References data, SWC::Condition::mem_eq(), and size.

+ Here is the call graph for this function:

◆ free()

SWC_CAN_INLINE void SWC::DB::Specs::Value::free ( )
inlinenoexcept

Definition at line 158 of file SpecsValue.h.

References _free(), data, matcher, and size.

Referenced by decode(), SWC::DB::Specs::Serial::Value::Fields::encode(), and set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_matching()

SWC_CAN_INLINE bool SWC::DB::Specs::Value::is_matching ( Types::Column  col_type,
const Cells::Cell cell 
) const
inline

Definition at line 211 of file SpecsValue.h.

References is_matching_counter(), is_matching_plain(), is_matching_serial(), and SWC::DB::Types::SERIAL.

+ Here is the call graph for this function:

◆ is_matching_counter()

bool SWC::DB::Specs::Value::is_matching_counter ( const Cells::Cell cell) const

Definition at line 79 of file SpecsValue.cc.

References comp, data, empty(), SWC::DB::Cells::Cell::get_counter(), SWC::Condition::is_matching(), matcher, and size.

Referenced by is_matching().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_matching_plain()

bool SWC::DB::Specs::Value::is_matching_plain ( const Cells::Cell cell) const

Definition at line 26 of file SpecsValue.cc.

References SWC::Core::Buffer< T >::base, comp, data, empty(), SWC::DB::Cells::Cell::get_value(), SWC::Condition::is_matching_extended(), matcher, SWC::Condition::RE, SWC::Condition::re(), SWC::Core::Buffer< T >::size, and size.

Referenced by is_matching().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_matching_serial()

bool SWC::DB::Specs::Value::is_matching_serial ( const Cells::Cell cell) const

Definition at line 58 of file SpecsValue.cc.

References comp, data, empty(), SWC::Condition::EQ, matcher, SWC::Condition::NE, and size.

Referenced by is_matching().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ move()

SWC_CAN_INLINE void SWC::DB::Specs::Value::move ( Value other)
noexcept

Definition at line 264 of file SpecsValue.h.

References data, SWC::Condition::NONE, and size.

Referenced by operator=().

+ Here is the caller graph for this function:

◆ operator=() [1/2]

SWC_CAN_INLINE Value& SWC::DB::Specs::Value::operator= ( const Value other)
inline

Definition at line 107 of file SpecsValue.h.

References copy().

+ Here is the call graph for this function:

◆ operator=() [2/2]

SWC_CAN_INLINE Value& SWC::DB::Specs::Value::operator= ( Value &&  other)
inlinenoexcept

Definition at line 113 of file SpecsValue.h.

References move().

+ Here is the call graph for this function:

◆ print()

void SWC::DB::Specs::Value::print ( Types::Column  col_type,
std::ostream &  out 
) const

Definition at line 89 of file SpecsValue.cc.

References display(), and size.

Referenced by to_string().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set() [1/4]

SWC_CAN_INLINE void SWC::DB::Specs::Value::set ( const char *  data_n,
Condition::Comp  comp_n,
bool  owner 
)
inline

Definition at line 124 of file SpecsValue.h.

Referenced by copy(), SWC::DB::Specs::Serial::Value::Fields::encode(), SWC::client::SQL::QuerySelect::read_value(), SWC::Thrift::Converter::set(), set(), set_counter(), and Value().

+ Here is the caller graph for this function:

◆ set() [2/4]

SWC_CAN_INLINE void SWC::DB::Specs::Value::set ( const char *  data_n,
uint32_t  size_n,
Condition::Comp  comp_n,
bool  owner 
)
inline

Definition at line 134 of file SpecsValue.h.

References set().

+ Here is the call graph for this function:

◆ set() [3/4]

SWC_CAN_INLINE void SWC::DB::Specs::Value::set ( const std::string &  data_n,
Condition::Comp  comp_n 
)
inline

Definition at line 129 of file SpecsValue.h.

References set().

+ Here is the call graph for this function:

◆ set() [4/4]

SWC_CAN_INLINE void SWC::DB::Specs::Value::set ( const uint8_t *  data_n,
const uint32_t  size_n,
Condition::Comp  comp_n,
bool  owner 
)

Definition at line 287 of file SpecsValue.h.

References comp, data, free(), own, and size.

+ Here is the call graph for this function:

◆ set_counter()

SWC_CAN_INLINE void SWC::DB::Specs::Value::set_counter ( int64_t  count,
Condition::Comp  comp_n 
)

Definition at line 278 of file SpecsValue.h.

References SWC::Serialization::encode_vi64(), SWC::Serialization::encoded_length_vi64(), and set().

Referenced by SWC::Thrift::Converter::set(), and Value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ to_string()

SWC_CAN_INLINE std::string SWC::DB::Specs::Value::to_string ( Types::Column  col_type) const
inline

Definition at line 234 of file SpecsValue.h.

References print().

+ Here is the call graph for this function:

Member Data Documentation

◆ comp

◆ data

uint8_t* SWC::DB::Specs::Value::data

◆ matcher

TypeMatcher* SWC::DB::Specs::Value::matcher
mutableprivate

Definition at line 258 of file SpecsValue.h.

Referenced by _free(), free(), is_matching_counter(), is_matching_plain(), and is_matching_serial().

◆ own

bool SWC::DB::Specs::Value::own

Definition at line 249 of file SpecsValue.h.

Referenced by _free(), decode(), SWC::DB::Specs::Serial::Value::Fields::encode(), and set().

◆ size

uint32_t SWC::DB::Specs::Value::size

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