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::Interval Class Reference

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

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

Public Types

typedef std::shared_ptr< IntervalPtr
 

Public Member Functions

 Interval (Types::Column col_type=Types::Column::UNKNOWN) noexcept
 
 Interval (const Cell::Key &range_begin, const Cell::Key &range_end)
 
 Interval (const uint8_t **bufp, size_t *remainp)
 
 Interval (const Interval &other)
 
 Interval (Interval &&other) noexcept
 
SWC_CAN_INLINE Intervaloperator= (const Interval &other)
 
SWC_CAN_INLINE Intervaloperator= (Interval &&other) noexcept
 
void copy (const Interval &other)
 
void move (Interval &other) noexcept
 
 ~Interval () noexcept
 
void free () noexcept
 
size_t size_of_internal () const noexcept
 
bool SWC_PURE_FUNC equal (const Interval &other) const noexcept
 
SWC_CAN_INLINE bool is_matching (const Types::KeySeq key_seq, const Cell::Key &key, int64_t timestamp, bool desc) const
 
constexpr SWC_CAN_INLINE bool is_matching (int64_t timestamp, bool desc) const noexcept
 
SWC_CAN_INLINE bool is_matching (const Types::KeySeq key_seq, const Cells::Cell &cell, bool &stop) const
 
bool is_matching_begin (const Types::KeySeq key_seq, const DB::Cell::Key &key) const
 
bool is_matching_end (const Types::KeySeq key_seq, const DB::Cell::Key &key) const
 
bool is_in_previous (const Types::KeySeq key_seq, const DB::Cell::Key &prev) const
 
size_t SWC_PURE_FUNC encoded_length () const noexcept
 
void encode (uint8_t **bufp) const
 
void decode (const uint8_t **bufp, size_t *remainp, bool owner)
 
constexpr SWC_CAN_INLINE void set_opt__key_equal () noexcept
 
constexpr SWC_CAN_INLINE void set_opt__range_end_rest () noexcept
 
constexpr SWC_CAN_INLINE void set_opt__updating () noexcept
 
constexpr SWC_CAN_INLINE void set_opt__deleting () noexcept
 
constexpr SWC_CAN_INLINE bool has_opt__key_equal () const noexcept
 
constexpr SWC_CAN_INLINE bool has_opt__range_end_rest () const noexcept
 
constexpr SWC_CAN_INLINE bool has_opt__updating () const noexcept
 
constexpr SWC_CAN_INLINE bool has_opt__deleting () const noexcept
 
SWC_CAN_INLINE bool is_updating () const noexcept
 
SWC_CAN_INLINE void apply_possible_range_pure ()
 
SWC_CAN_INLINE void apply_possible_range (DB::Cell::Key &begin, DB::Cell::Key &end, bool *end_restp=nullptr) const
 
void apply_possible_range_begin (DB::Cell::Key &begin) const
 
void apply_possible_range_end (DB::Cell::Key &end, bool *restp=nullptr) const
 
void apply_possible_range (DB::Cell::Key &key, bool ending, bool rest, bool no_stepping) const
 
SWC_CAN_INLINE std::string to_string () const
 
void print (std::ostream &out) const
 
void display (std::ostream &out, bool pretty=false, const std::string &offset="") const
 

Static Public Member Functions

static SWC_CAN_INLINE Ptr make_ptr (Types::Column col_type=Types::Column::UNKNOWN)
 
static SWC_CAN_INLINE Ptr make_ptr (const uint8_t **bufp, size_t *remainp)
 
static SWC_CAN_INLINE Ptr make_ptr (const Interval &other)
 
static SWC_CAN_INLINE Ptr make_ptr (Interval &&other)
 

Public Attributes

Cell::Key range_begin
 
Cell::Key range_end
 
KeyIntervals key_intervals
 
Values values
 
Timestamp ts_start
 
Timestamp ts_finish
 
Flags flags
 
Cell::Key offset_key
 
int64_t offset_rev
 
uint8_t options
 
IntervalUpdate::Ptr updating
 

Static Public Attributes

static constexpr const uint8_t OPT_KEY_EQUAL = 0x01
 
static constexpr const uint8_t OPT_RANGE_END_REST = 0x02
 
static constexpr const uint8_t OPT_UPDATING = 0x04
 
static constexpr const uint8_t OPT_DELETING = 0x08
 

Detailed Description

Definition at line 25 of file SpecsInterval.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<Interval> SWC::DB::Specs::Interval::Ptr

Definition at line 33 of file SpecsInterval.h.

Constructor & Destructor Documentation

◆ Interval() [1/5]

SWC::DB::Specs::Interval::Interval ( Types::Column  col_type = Types::Column::UNKNOWN)
explicitnoexcept

Definition at line 14 of file SpecsInterval.cc.

Referenced by make_ptr().

+ Here is the caller graph for this function:

◆ Interval() [2/5]

SWC::DB::Specs::Interval::Interval ( const Cell::Key range_begin,
const Cell::Key range_end 
)
explicit

Definition at line 21 of file SpecsInterval.cc.

◆ Interval() [3/5]

SWC::DB::Specs::Interval::Interval ( const uint8_t **  bufp,
size_t *  remainp 
)
explicit

Definition at line 33 of file SpecsInterval.cc.

References SWC::DB::Specs::Flags::clear_only_deletes(), flags, has_opt__updating(), and updating.

+ Here is the call graph for this function:

◆ Interval() [4/5]

SWC::DB::Specs::Interval::Interval ( const Interval other)
explicit

Definition at line 51 of file SpecsInterval.cc.

◆ Interval() [5/5]

SWC::DB::Specs::Interval::Interval ( Interval &&  other)
explicitnoexcept

Definition at line 68 of file SpecsInterval.cc.

◆ ~Interval()

SWC::DB::Specs::Interval::~Interval ( )
noexcept

Definition at line 82 of file SpecsInterval.cc.

Member Function Documentation

◆ apply_possible_range() [1/2]

SWC_CAN_INLINE void SWC::DB::Specs::Interval::apply_possible_range ( DB::Cell::Key begin,
DB::Cell::Key end,
bool *  end_restp = nullptr 
) const
inline

Definition at line 208 of file SpecsInterval.h.

References apply_possible_range_begin(), and apply_possible_range_end().

Referenced by apply_possible_range_begin(), apply_possible_range_end(), apply_possible_range_pure(), and SWC::client::Query::Select::Scanner::rgr_locate_meta().

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

◆ apply_possible_range() [2/2]

void SWC::DB::Specs::Interval::apply_possible_range ( DB::Cell::Key key,
bool  ending,
bool  rest,
bool  no_stepping 
) const

◆ apply_possible_range_begin()

void SWC::DB::Specs::Interval::apply_possible_range_begin ( DB::Cell::Key begin) const

Definition at line 217 of file SpecsInterval.cc.

References apply_possible_range(), SWC::DB::Cell::Key::copy(), SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), SWC::DB::Cell::Key::empty(), SWC::DB::Cell::Key::free(), key_intervals, offset_key, and range_begin.

Referenced by apply_possible_range().

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

◆ apply_possible_range_end()

void SWC::DB::Specs::Interval::apply_possible_range_end ( DB::Cell::Key end,
bool *  restp = nullptr 
) const

Definition at line 231 of file SpecsInterval.cc.

References apply_possible_range(), SWC::DB::Cell::Key::copy(), SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), SWC::DB::Cell::Key::empty(), SWC::DB::Cell::Key::free(), key_intervals, and range_end.

Referenced by apply_possible_range().

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

◆ apply_possible_range_pure()

SWC_CAN_INLINE void SWC::DB::Specs::Interval::apply_possible_range_pure ( )
inline

Definition at line 193 of file SpecsInterval.h.

References apply_possible_range(), SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), SWC::DB::Cell::Key::empty(), has_opt__key_equal(), key_intervals, range_begin, range_end, and set_opt__range_end_rest().

Referenced by SWC::Ranger::Callback::RangeQuerySelect::RangeQuerySelect().

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

◆ copy()

void SWC::DB::Specs::Interval::copy ( const Interval other)

Definition at line 84 of file SpecsInterval.cc.

References SWC::DB::Specs::Flags::copy(), SWC::DB::Cell::Key::copy(), SWC::DB::Specs::KeyIntervals::copy(), SWC::DB::Specs::Timestamp::copy(), SWC::DB::Specs::Values::copy(), flags, is_updating(), key_intervals, offset_key, offset_rev, options, range_begin, range_end, ts_finish, ts_start, updating, and values.

Referenced by operator=().

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

◆ decode()

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

Definition at line 192 of file SpecsInterval.cc.

References SWC::DB::Specs::Flags::clear_only_deletes(), SWC::DB::Specs::Flags::decode(), SWC::DB::Specs::KeyIntervals::decode(), SWC::DB::Specs::Timestamp::decode(), SWC::DB::Cell::Key::decode(), SWC::DB::Specs::Values::decode(), SWC::Serialization::decode_i8(), SWC::Serialization::decode_vi64(), flags, has_opt__updating(), key_intervals, offset_key, offset_rev, options, range_begin, range_end, ts_finish, ts_start, updating, and values.

Referenced by SWC::Comm::Protocol::Bkr::Params::CellsSelectReq::internal_decode(), and SWC::Comm::Protocol::Rgr::Params::RangeQuerySelectReq::internal_decode().

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

◆ display()

void SWC::DB::Specs::Interval::display ( std::ostream &  out,
bool  pretty = false,
const std::string &  offset = "" 
) const

Definition at line 351 of file SpecsInterval.cc.

References SWC::DB::Specs::Flags::display(), SWC::DB::Specs::Timestamp::display(), SWC::DB::Specs::KeyIntervals::display(), SWC::DB::Specs::Values::display(), SWC::DB::Cell::Key::display_details(), flags, has_opt__deleting(), has_opt__key_equal(), has_opt__range_end_rest(), has_opt__updating(), is_updating(), key_intervals, offset_key, offset_rev, range_begin, range_end, ts_finish, ts_start, updating, and values.

Referenced by SWC::Utils::shell::Statistics::show().

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

◆ encode()

void SWC::DB::Specs::Interval::encode ( uint8_t **  bufp) const

◆ encoded_length()

size_t SWC::DB::Specs::Interval::encoded_length ( ) const
noexcept

◆ equal()

bool SWC::DB::Specs::Interval::equal ( const Interval other) const
noexcept

Definition at line 138 of file SpecsInterval.cc.

References flags.

◆ free()

void SWC::DB::Specs::Interval::free ( )
noexcept

Definition at line 129 of file SpecsInterval.cc.

References SWC::Core::Vector< T, SizeT, GROW_SZ >::clear(), SWC::DB::Cell::Key::free(), key_intervals, offset_key, range_begin, range_end, updating, and values.

+ Here is the call graph for this function:

◆ has_opt__deleting()

constexpr SWC_CAN_INLINE bool SWC::DB::Specs::Interval::has_opt__deleting ( ) const
inlineconstexprnoexcept

Definition at line 183 of file SpecsInterval.h.

References OPT_DELETING, and options.

Referenced by display(), SWC::Comm::Protocol::Rgr::Handler::RangeQuerySelect::operator()(), and print().

+ Here is the caller graph for this function:

◆ has_opt__key_equal()

constexpr SWC_CAN_INLINE bool SWC::DB::Specs::Interval::has_opt__key_equal ( ) const
inlineconstexprnoexcept

Definition at line 168 of file SpecsInterval.h.

References OPT_KEY_EQUAL, and options.

Referenced by apply_possible_range_pure(), display(), is_in_previous(), is_matching_end(), print(), and SWC::client::Query::Select::Scanner::rgr_locate_meta().

+ Here is the caller graph for this function:

◆ has_opt__range_end_rest()

constexpr SWC_CAN_INLINE bool SWC::DB::Specs::Interval::has_opt__range_end_rest ( ) const
inlineconstexprnoexcept

Definition at line 173 of file SpecsInterval.h.

References OPT_RANGE_END_REST, and options.

Referenced by display(), is_in_previous(), is_matching_end(), print(), and SWC::client::Query::Select::Scanner::rgr_locate_meta().

+ Here is the caller graph for this function:

◆ has_opt__updating()

constexpr SWC_CAN_INLINE bool SWC::DB::Specs::Interval::has_opt__updating ( ) const
inlineconstexprnoexcept

Definition at line 178 of file SpecsInterval.h.

References OPT_UPDATING, and options.

Referenced by decode(), display(), Interval(), SWC::Comm::Protocol::Rgr::Handler::RangeQuerySelect::operator()(), and print().

+ Here is the caller graph for this function:

◆ is_in_previous()

SWC_CAN_INLINE bool SWC::DB::Specs::Interval::is_in_previous ( const Types::KeySeq  key_seq,
const DB::Cell::Key prev 
) const

Definition at line 352 of file SpecsInterval.h.

References SWC::DB::KeySeq::compare_opt_fc_lexic(), SWC::DB::KeySeq::compare_opt_fc_volume(), SWC::DB::KeySeq::compare_opt_lexic(), SWC::DB::KeySeq::compare_opt_volume(), SWC::DB::Cell::Key::count, SWC::DB::Cell::Key::empty(), SWC::Condition::GT, has_opt__key_equal(), has_opt__range_end_rest(), range_end, and SWC::DB::Types::UNKNOWN.

Referenced by SWC::Ranger::Block::includes_end().

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

◆ is_matching() [1/3]

SWC_CAN_INLINE bool SWC::DB::Specs::Interval::is_matching ( const Types::KeySeq  key_seq,
const Cell::Key key,
int64_t  timestamp,
bool  desc 
) const
inline

Definition at line 91 of file SpecsInterval.h.

References SWC::DB::KeySeq::compare(), SWC::DB::Cell::Key::empty(), SWC::Condition::EQ, SWC::Condition::LT, and offset_key.

Referenced by is_matching(), SWC::DB::Cells::Mutable::scan_test_use(), SWC::DB::Cells::Mutable::scan_version_multi(), SWC::Ranger::CompactRange::selector(), and SWC::DB::Cells::ReqScan::selector().

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

◆ is_matching() [2/3]

SWC_CAN_INLINE bool SWC::DB::Specs::Interval::is_matching ( const Types::KeySeq  key_seq,
const Cells::Cell cell,
bool &  stop 
) const
inline

◆ is_matching() [3/3]

constexpr SWC_CAN_INLINE bool SWC::DB::Specs::Interval::is_matching ( int64_t  timestamp,
bool  desc 
) const
inlineconstexprnoexcept

Definition at line 108 of file SpecsInterval.h.

References offset_rev.

◆ is_matching_begin()

SWC_CAN_INLINE bool SWC::DB::Specs::Interval::is_matching_begin ( const Types::KeySeq  key_seq,
const DB::Cell::Key key 
) const

Definition at line 265 of file SpecsInterval.h.

References SWC::DB::KeySeq::compare_opt_fc_lexic(), SWC::DB::KeySeq::compare_opt_fc_volume(), SWC::DB::KeySeq::compare_opt_lexic(), SWC::DB::KeySeq::compare_opt_volume(), SWC::DB::Cell::Key::count, SWC::DB::Cell::Key::empty(), SWC::Condition::LT, range_begin, and SWC::DB::Types::UNKNOWN.

Referenced by SWC::Ranger::Block::_includes_begin(), is_matching(), and SWC::Ranger::Callback::RangeLocateScan::selector().

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

◆ is_matching_end()

SWC_CAN_INLINE bool SWC::DB::Specs::Interval::is_matching_end ( const Types::KeySeq  key_seq,
const DB::Cell::Key key 
) const

Definition at line 300 of file SpecsInterval.h.

References SWC::DB::KeySeq::compare_opt_fc_lexic(), SWC::DB::KeySeq::compare_opt_fc_volume(), SWC::DB::KeySeq::compare_opt_lexic(), SWC::DB::KeySeq::compare_opt_volume(), SWC::DB::Cell::Key::count, SWC::DB::Cell::Key::empty(), SWC::Condition::GT, has_opt__key_equal(), has_opt__range_end_rest(), range_end, and SWC::DB::Types::UNKNOWN.

Referenced by is_matching(), and SWC::Ranger::Callback::RangeLocateScan::selector().

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

◆ is_updating()

SWC_CAN_INLINE bool SWC::DB::Specs::Interval::is_updating ( ) const
inlinenoexcept

Definition at line 188 of file SpecsInterval.h.

References updating.

Referenced by copy(), display(), encode(), encoded_length(), print(), and size_of_internal().

+ Here is the caller graph for this function:

◆ make_ptr() [1/4]

static SWC_CAN_INLINE Ptr SWC::DB::Specs::Interval::make_ptr ( const Interval other)
inlinestatic

Definition at line 46 of file SpecsInterval.h.

References Interval().

+ Here is the call graph for this function:

◆ make_ptr() [2/4]

static SWC_CAN_INLINE Ptr SWC::DB::Specs::Interval::make_ptr ( const uint8_t **  bufp,
size_t *  remainp 
)
inlinestatic

Definition at line 41 of file SpecsInterval.h.

References Interval().

+ Here is the call graph for this function:

◆ make_ptr() [3/4]

static SWC_CAN_INLINE Ptr SWC::DB::Specs::Interval::make_ptr ( Interval &&  other)
inlinestatic

Definition at line 51 of file SpecsInterval.h.

References Interval().

+ Here is the call graph for this function:

◆ make_ptr() [4/4]

static SWC_CAN_INLINE Ptr SWC::DB::Specs::Interval::make_ptr ( Types::Column  col_type = Types::Column::UNKNOWN)
inlinestatic

Definition at line 36 of file SpecsInterval.h.

References Interval().

Referenced by SWC::client::SQL::QuerySelect::parse_dump(), and SWC::client::SQL::QuerySelect::read_cells_intervals().

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

◆ move()

void SWC::DB::Specs::Interval::move ( Interval other)
noexcept

Definition at line 108 of file SpecsInterval.cc.

References flags.

Referenced by operator=().

+ Here is the caller graph for this function:

◆ operator=() [1/2]

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

Definition at line 67 of file SpecsInterval.h.

References copy().

+ Here is the call graph for this function:

◆ operator=() [2/2]

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

Definition at line 73 of file SpecsInterval.h.

References move().

+ Here is the call graph for this function:

◆ print()

◆ set_opt__deleting()

constexpr SWC_CAN_INLINE void SWC::DB::Specs::Interval::set_opt__deleting ( )
inlineconstexprnoexcept

Definition at line 163 of file SpecsInterval.h.

References OPT_DELETING, and options.

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

+ Here is the caller graph for this function:

◆ set_opt__key_equal()

constexpr SWC_CAN_INLINE void SWC::DB::Specs::Interval::set_opt__key_equal ( )
inlineconstexprnoexcept

Definition at line 148 of file SpecsInterval.h.

References OPT_KEY_EQUAL, and options.

Referenced by SWC::Ranger::Callback::RangeLocateScan::RangeLocateScan(), SWC::Ranger::CompactRange::response(), and SWC::Utils::LoadGenerator::select_data().

+ Here is the caller graph for this function:

◆ set_opt__range_end_rest()

constexpr SWC_CAN_INLINE void SWC::DB::Specs::Interval::set_opt__range_end_rest ( )
inlineconstexprnoexcept

Definition at line 153 of file SpecsInterval.h.

References OPT_RANGE_END_REST, and options.

Referenced by apply_possible_range_pure(), SWC::Ranger::Callback::RangeLocateScan::RangeLocateScan(), and SWC::client::SQL::QuerySelect::read_cells_interval().

+ Here is the caller graph for this function:

◆ set_opt__updating()

constexpr SWC_CAN_INLINE void SWC::DB::Specs::Interval::set_opt__updating ( )
inlineconstexprnoexcept

Definition at line 158 of file SpecsInterval.h.

References OPT_UPDATING, and options.

Referenced by SWC::Thrift::Converter::set().

+ Here is the caller graph for this function:

◆ size_of_internal()

SWC_CAN_INLINE size_t SWC::DB::Specs::Interval::size_of_internal ( ) const
noexcept

Definition at line 256 of file SpecsInterval.h.

References is_updating(), key_intervals, offset_key, range_begin, range_end, SWC::DB::Cell::Key::size, SWC::DB::Specs::KeyIntervals::size_of_internal(), SWC::DB::Specs::Values::size_of_internal(), updating, and values.

+ Here is the call graph for this function:

◆ to_string()

SWC_CAN_INLINE std::string SWC::DB::Specs::Interval::to_string ( ) const
inline

Definition at line 223 of file SpecsInterval.h.

References print().

+ Here is the call graph for this function:

Member Data Documentation

◆ flags

◆ key_intervals

◆ offset_key

◆ offset_rev

◆ OPT_DELETING

constexpr const uint8_t SWC::DB::Specs::Interval::OPT_DELETING = 0x08
staticconstexpr

Definition at line 31 of file SpecsInterval.h.

Referenced by has_opt__deleting(), and set_opt__deleting().

◆ OPT_KEY_EQUAL

constexpr const uint8_t SWC::DB::Specs::Interval::OPT_KEY_EQUAL = 0x01
staticconstexpr

◆ OPT_RANGE_END_REST

constexpr const uint8_t SWC::DB::Specs::Interval::OPT_RANGE_END_REST = 0x02
staticconstexpr

Definition at line 29 of file SpecsInterval.h.

Referenced by has_opt__range_end_rest(), and set_opt__range_end_rest().

◆ OPT_UPDATING

constexpr const uint8_t SWC::DB::Specs::Interval::OPT_UPDATING = 0x04
staticconstexpr

Definition at line 30 of file SpecsInterval.h.

Referenced by encode(), has_opt__updating(), and set_opt__updating().

◆ options

◆ range_begin

◆ range_end

◆ ts_finish

◆ ts_start

◆ updating

◆ values


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