#include <swcdb/db/Cells/SpecsValue.h>
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 Value & | operator= (const Value &other) |
SWC_CAN_INLINE Value & | operator= (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 | |
TypeMatcher * | matcher |
Definition at line 17 of file SpecsValue.h.
|
inlineexplicitconstexprnoexcept |
Definition at line 21 of file SpecsValue.h.
|
inlineexplicit |
Definition at line 27 of file SpecsValue.h.
References set().
|
inlineexplicit |
Definition at line 36 of file SpecsValue.h.
References set().
|
inlineexplicit |
Definition at line 45 of file SpecsValue.h.
References set().
|
inlineexplicit |
Definition at line 54 of file SpecsValue.h.
References set_counter().
|
inlineexplicit |
Definition at line 62 of file SpecsValue.h.
References size.
|
inlineexplicit |
Definition at line 83 of file SpecsValue.h.
|
inlineexplicitconstexprnoexcept |
Definition at line 96 of file SpecsValue.h.
References SWC::Condition::NONE.
|
inlinenoexcept |
Definition at line 146 of file SpecsValue.h.
References _free().
|
inlinenoexcept |
|
inline |
Definition at line 119 of file SpecsValue.h.
References comp, data, set(), and size.
Referenced by operator=().
|
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.
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().
|
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().
|
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.
|
inlineconstexprnoexcept |
Definition at line 174 of file SpecsValue.h.
References comp, SWC::Serialization::encoded_length_vi32(), SWC::Condition::NONE, and size.
|
constexprnoexcept |
Definition at line 299 of file SpecsValue.h.
References data, SWC::Condition::mem_eq(), and size.
|
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().
|
inline |
Definition at line 211 of file SpecsValue.h.
References is_matching_counter(), is_matching_plain(), is_matching_serial(), and SWC::DB::Types::SERIAL.
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().
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().
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().
|
noexcept |
Definition at line 264 of file SpecsValue.h.
References data, SWC::Condition::NONE, and size.
Referenced by operator=().
|
inline |
Definition at line 107 of file SpecsValue.h.
References copy().
|
inlinenoexcept |
Definition at line 113 of file SpecsValue.h.
References move().
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().
|
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().
|
inline |
Definition at line 134 of file SpecsValue.h.
References set().
|
inline |
Definition at line 129 of file SpecsValue.h.
References set().
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 | ||
) |
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().
|
inline |
Definition at line 234 of file SpecsValue.h.
References print().
Condition::Comp SWC::DB::Specs::Value::comp |
Definition at line 250 of file SpecsValue.h.
Referenced by copy(), decode(), display(), empty(), SWC::DB::Specs::Serial::Value::Fields::encode(), encode(), encoded_length(), is_matching_counter(), is_matching_plain(), is_matching_serial(), SWC::client::SQL::QuerySelect::read_value(), SWC::Thrift::Converter::set(), and set().
uint8_t* SWC::DB::Specs::Value::data |
Definition at line 252 of file SpecsValue.h.
Referenced by _free(), copy(), decode(), display(), encode(), free(), is_matching_counter(), is_matching_plain(), is_matching_serial(), and set().
|
mutableprivate |
Definition at line 258 of file SpecsValue.h.
Referenced by _free(), free(), is_matching_counter(), is_matching_plain(), and is_matching_serial().
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().
uint32_t SWC::DB::Specs::Value::size |
Definition at line 251 of file SpecsValue.h.
Referenced by copy(), decode(), display(), encode(), encoded_length(), free(), is_matching_counter(), is_matching_plain(), is_matching_serial(), print(), set(), and Value().