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::Cells::Result Class Referencefinal

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

+ Inheritance diagram for SWC::DB::Cells::Result:
+ Collaboration diagram for SWC::DB::Cells::Result:

Public Types

using Vec = std::vector< Cell * >
 

Public Member Functions

SWC_CAN_INLINE Result (const uint64_t ttl_ns=0) noexcept
 
SWC_CAN_INLINE Result (Result &&other) noexcept
 
 Result (const Result &other)=delete
 
Resultoperator= (const Result &other)=delete
 
 ~Result () noexcept
 
void free () noexcept
 
constexpr SWC_CAN_INLINE size_t size_bytes () const noexcept
 
void take (Result &other)
 
void add (const Cell &cell, bool no_value=false)
 
size_t add (const uint8_t *ptr, size_t remain)
 
Celltakeout_begin (size_t idx)
 
Celltakeout_end (size_t idx)
 
void write (DynamicBuffer &cells) const
 
void write_and_free (DynamicBuffer &cells, uint32_t &cell_count, Interval &intval, uint32_t threshold, uint32_t max_cells)
 
void print (std::ostream &out, Types::Column col_type=Types::Column::PLAIN, bool with_cells=false) const
 

Public Attributes

size_t bytes
 
uint64_t ttl
 

Detailed Description

Definition at line 16 of file Result.h.

Member Typedef Documentation

◆ Vec

using SWC::DB::Cells::Result::Vec = std::vector<Cell*>

Definition at line 19 of file Result.h.

Constructor & Destructor Documentation

◆ Result() [1/3]

SWC_CAN_INLINE SWC::DB::Cells::Result::Result ( const uint64_t  ttl_ns = 0)
inlineexplicitnoexcept

Definition at line 36 of file Result.h.

◆ Result() [2/3]

SWC_CAN_INLINE SWC::DB::Cells::Result::Result ( Result &&  other)
inlineexplicitnoexcept

Definition at line 41 of file Result.h.

◆ Result() [3/3]

SWC::DB::Cells::Result::Result ( const Result other)
delete

◆ ~Result()

SWC::DB::Cells::Result::~Result ( )
inlinenoexcept

Definition at line 51 of file Result.h.

Member Function Documentation

◆ add() [1/2]

SWC_CAN_INLINE void SWC::DB::Cells::Result::add ( const Cell cell,
bool  no_value = false 
)

Definition at line 109 of file Result.h.

References bytes, and SWC::DB::Cells::Cell::encoded_length().

Referenced by SWC::DB::Cells::ReqScanTest::add_cell_and_more(), SWC::Ranger::ReqScanTest::add_cell_and_more(), SWC::client::Query::Select::Handlers::BaseSingleColumn::add_cells(), and SWC::client::Query::Select::Handlers::BaseUnorderedMap::Rsp::add_cells().

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

◆ add() [2/2]

SWC_CAN_INLINE size_t SWC::DB::Cells::Result::add ( const uint8_t *  ptr,
size_t  remain 
)

Definition at line 116 of file Result.h.

References bytes.

◆ free()

void SWC::DB::Cells::Result::free ( )
inlinenoexcept

Definition at line 56 of file Result.h.

References bytes.

Referenced by SWC::ThriftBroker::AppHandler::process_results(), SWC::DB::Cells::TSV::FileWriter::write(), and write_and_free().

+ Here is the caller graph for this function:

◆ operator=()

Result& SWC::DB::Cells::Result::operator= ( const Result other)
delete

◆ print()

void SWC::DB::Cells::Result::print ( std::ostream &  out,
Types::Column  col_type = Types::Column::PLAIN,
bool  with_cells = false 
) const

Definition at line 64 of file Result.cc.

References bytes, size, and ttl.

Referenced by SWC::Ranger::Range::check_meta(), and SWC::Manager::MngdColumns::remove().

+ Here is the caller graph for this function:

◆ size_bytes()

constexpr SWC_CAN_INLINE size_t SWC::DB::Cells::Result::size_bytes ( ) const
inlineconstexprnoexcept

Definition at line 64 of file Result.h.

References bytes.

Referenced by SWC::client::Query::Select::Handlers::BaseSingleColumn::get_size_bytes(), SWC::DB::Cells::ReqScanTest::reached_limits(), SWC::Ranger::ReqScanTest::reached_limits(), SWC::Utils::LoadGenerator::select_data(), and SWC::DB::Cells::TSV::FileWriter::write().

+ Here is the caller graph for this function:

◆ take()

SWC_CAN_INLINE void SWC::DB::Cells::Result::take ( Result other)

Definition at line 95 of file Result.h.

References bytes, and size.

Referenced by SWC::client::Query::Select::Handlers::BaseSingleColumn::get_cells(), and SWC::client::Query::Select::Handlers::BaseUnorderedMap::Rsp::get_cells().

+ Here is the caller graph for this function:

◆ takeout_begin()

SWC_CAN_INLINE Cell * SWC::DB::Cells::Result::takeout_begin ( size_t  idx)

Definition at line 128 of file Result.h.

References bytes, and SWC::DB::Cells::Cell::encoded_length().

+ Here is the call graph for this function:

◆ takeout_end()

SWC_CAN_INLINE Cell * SWC::DB::Cells::Result::takeout_end ( size_t  idx)

Definition at line 137 of file Result.h.

References bytes, and SWC::DB::Cells::Cell::encoded_length().

+ Here is the call graph for this function:

◆ write()

void SWC::DB::Cells::Result::write ( DynamicBuffer cells) const

Definition at line 14 of file Result.cc.

References bytes, SWC::Core::BufferDyn< BufferT >::ensure(), and ttl.

+ Here is the call graph for this function:

◆ write_and_free()

void SWC::DB::Cells::Result::write_and_free ( DynamicBuffer cells,
uint32_t &  cell_count,
Interval intval,
uint32_t  threshold,
uint32_t  max_cells 
)

Definition at line 22 of file Result.cc.

References SWC::DB::Cells::Interval::align(), bytes, SWC::Core::BufferDyn< BufferT >::ensure(), SWC::DB::Cells::Interval::expand(), SWC::DB::Cells::Interval::expand_begin(), SWC::DB::Cells::Interval::expand_end(), SWC::Core::BufferDyn< BufferT >::fill(), free(), and ttl.

+ Here is the call graph for this function:

Member Data Documentation

◆ bytes

size_t SWC::DB::Cells::Result::bytes

Definition at line 32 of file Result.h.

Referenced by add(), free(), print(), size_bytes(), take(), takeout_begin(), takeout_end(), write(), and write_and_free().

◆ ttl

uint64_t SWC::DB::Cells::Result::ttl

Definition at line 33 of file Result.h.

Referenced by print(), write(), and write_and_free().


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