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::UpdateOP Struct Reference

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

Public Member Functions

SWC_CAN_INLINE UpdateOP (uint8_t a_op=REPLACE, uint32_t a_pos=0) noexcept
 
SWC_CAN_INLINE UpdateOP (const uint8_t **bufp, size_t *remainp)
 
SWC_CAN_INLINE UpdateOP (const UpdateOP &other) noexcept
 
SWC_CAN_INLINE UpdateOP (UpdateOP &&other) noexcept
 
SWC_CAN_INLINE UpdateOPoperator= (const UpdateOP &other) noexcept
 
SWC_CAN_INLINE UpdateOPoperator= (UpdateOP &&other) noexcept
 
SWC_CAN_INLINE bool equal (const UpdateOP &other) const noexcept
 
SWC_CAN_INLINE void set_op (uint8_t a_op) noexcept
 
SWC_CAN_INLINE uint8_t get_op () const noexcept
 
SWC_CAN_INLINE void set_pos (uint32_t a_pos) noexcept
 
SWC_CAN_INLINE uint32_t get_pos () const noexcept
 
SWC_CAN_INLINE bool has_pos () const noexcept
 
SWC_CAN_INLINE size_t encoded_length () const noexcept
 
SWC_CAN_INLINE void encode (uint8_t **bufp) const
 
SWC_CAN_INLINE void print (std::ostream &out) const
 

Static Public Member Functions

static const char * to_string (uint8_t op) noexcept
 

Public Attributes

uint8_t op
 
uint32_t pos
 

Static Public Attributes

static constexpr const uint8_t REPLACE = 0x00
 
static constexpr const uint8_t APPEND = 0x01
 
static constexpr const uint8_t PREPEND = 0x02
 
static constexpr const uint8_t INSERT = 0x03
 
static constexpr const uint8_t OVERWRITE = 0x04
 
static constexpr const uint8_t SERIAL = 0x05
 

Detailed Description

Definition at line 18 of file SpecsUpdateOp.h.

Constructor & Destructor Documentation

◆ UpdateOP() [1/4]

SWC_CAN_INLINE SWC::DB::Specs::UpdateOP::UpdateOP ( uint8_t  a_op = REPLACE,
uint32_t  a_pos = 0 
)
inlinenoexcept

Definition at line 55 of file SpecsUpdateOp.h.

◆ UpdateOP() [2/4]

SWC_CAN_INLINE SWC::DB::Specs::UpdateOP::UpdateOP ( const uint8_t **  bufp,
size_t *  remainp 
)
inline

Definition at line 60 of file SpecsUpdateOp.h.

◆ UpdateOP() [3/4]

SWC_CAN_INLINE SWC::DB::Specs::UpdateOP::UpdateOP ( const UpdateOP other)
inlinenoexcept

Definition at line 66 of file SpecsUpdateOp.h.

◆ UpdateOP() [4/4]

SWC_CAN_INLINE SWC::DB::Specs::UpdateOP::UpdateOP ( UpdateOP &&  other)
inlinenoexcept

Definition at line 71 of file SpecsUpdateOp.h.

Member Function Documentation

◆ encode()

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

Definition at line 125 of file SpecsUpdateOp.h.

References SWC::Serialization::encode_i8(), SWC::Serialization::encode_vi32(), has_pos(), op, and pos.

Referenced by SWC::DB::Specs::IntervalUpdate::encode().

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

◆ encoded_length()

SWC_CAN_INLINE size_t SWC::DB::Specs::UpdateOP::encoded_length ( ) const
inlinenoexcept

Definition at line 120 of file SpecsUpdateOp.h.

References SWC::Serialization::encoded_length_vi32(), has_pos(), and pos.

Referenced by SWC::DB::Specs::IntervalUpdate::encoded_length().

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

◆ equal()

SWC_CAN_INLINE bool SWC::DB::Specs::UpdateOP::equal ( const UpdateOP other) const
inlinenoexcept

Definition at line 90 of file SpecsUpdateOp.h.

References op, and pos.

Referenced by SWC::DB::Specs::IntervalUpdate::equal().

+ Here is the caller graph for this function:

◆ get_op()

SWC_CAN_INLINE uint8_t SWC::DB::Specs::UpdateOP::get_op ( ) const
inlinenoexcept

Definition at line 100 of file SpecsUpdateOp.h.

References op.

Referenced by print(), SWC::client::SQL::QuerySelect::read_update(), and SWC::Thrift::Converter::set().

+ Here is the caller graph for this function:

◆ get_pos()

SWC_CAN_INLINE uint32_t SWC::DB::Specs::UpdateOP::get_pos ( ) const
inlinenoexcept

Definition at line 110 of file SpecsUpdateOp.h.

References pos.

◆ has_pos()

SWC_CAN_INLINE bool SWC::DB::Specs::UpdateOP::has_pos ( ) const
inlinenoexcept

Definition at line 115 of file SpecsUpdateOp.h.

References INSERT, op, and OVERWRITE.

Referenced by encode(), encoded_length(), print(), and SWC::Thrift::Converter::set().

+ Here is the caller graph for this function:

◆ operator=() [1/2]

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

Definition at line 76 of file SpecsUpdateOp.h.

References op, and pos.

◆ operator=() [2/2]

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

Definition at line 83 of file SpecsUpdateOp.h.

References op, and pos.

◆ print()

SWC_CAN_INLINE void SWC::DB::Specs::UpdateOP::print ( std::ostream &  out) const
inline

Definition at line 132 of file SpecsUpdateOp.h.

References get_op(), has_pos(), pos, and to_string().

Referenced by SWC::DB::Specs::IntervalUpdate::display().

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

◆ set_op()

SWC_CAN_INLINE void SWC::DB::Specs::UpdateOP::set_op ( uint8_t  a_op)
inlinenoexcept

Definition at line 95 of file SpecsUpdateOp.h.

References op.

Referenced by SWC::client::SQL::Reader::read_operation(), and SWC::Thrift::Converter::set().

+ Here is the caller graph for this function:

◆ set_pos()

SWC_CAN_INLINE void SWC::DB::Specs::UpdateOP::set_pos ( uint32_t  a_pos)
inlinenoexcept

Definition at line 105 of file SpecsUpdateOp.h.

References pos.

Referenced by SWC::client::SQL::Reader::read_operation(), and SWC::Thrift::Converter::set().

+ Here is the caller graph for this function:

◆ to_string()

static const char* SWC::DB::Specs::UpdateOP::to_string ( uint8_t  op)
inlinestaticnoexcept

Definition at line 28 of file SpecsUpdateOp.h.

References APPEND, INSERT, op, OVERWRITE, PREPEND, REPLACE, and SERIAL.

Referenced by print().

+ Here is the caller graph for this function:

Member Data Documentation

◆ APPEND

constexpr const uint8_t SWC::DB::Specs::UpdateOP::APPEND = 0x01
staticconstexpr

◆ INSERT

constexpr const uint8_t SWC::DB::Specs::UpdateOP::INSERT = 0x03
staticconstexpr

◆ op

uint8_t SWC::DB::Specs::UpdateOP::op

Definition at line 138 of file SpecsUpdateOp.h.

Referenced by encode(), equal(), get_op(), has_pos(), operator=(), set_op(), and to_string().

◆ OVERWRITE

constexpr const uint8_t SWC::DB::Specs::UpdateOP::OVERWRITE = 0x04
staticconstexpr

◆ pos

uint32_t SWC::DB::Specs::UpdateOP::pos

Definition at line 139 of file SpecsUpdateOp.h.

Referenced by encode(), encoded_length(), equal(), get_pos(), operator=(), print(), and set_pos().

◆ PREPEND

constexpr const uint8_t SWC::DB::Specs::UpdateOP::PREPEND = 0x02
staticconstexpr

◆ REPLACE

constexpr const uint8_t SWC::DB::Specs::UpdateOP::REPLACE = 0x00
staticconstexpr

◆ SERIAL

constexpr const uint8_t SWC::DB::Specs::UpdateOP::SERIAL = 0x05
staticconstexpr

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