|
SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
|
Go to the documentation of this file.
7 #ifndef swcdb_db_Cells_Result_h
8 #define swcdb_db_Cells_Result_h
13 namespace SWC {
namespace DB {
namespace Cells {
16 class Result final :
private std::vector<Cell*> {
19 using Vec = std::vector<Cell*>;
30 using Vec::operator[];
36 explicit Result(
const uint64_t ttl_ns=0) noexcept
42 :
Vec(std::move(other)),
52 for(
auto cell : *
this)
57 for(
auto cell : *
this)
70 void add(
const Cell& cell,
bool no_value=
false);
72 size_t add(
const uint8_t* ptr,
size_t remain);
83 Interval& intval, uint32_t threshold,
88 bool with_cells=
false)
const;
97 Vec::operator=(std::move(other));
100 reserve(
size() + other.size());
101 insert(cend(), other.cbegin(), other.cend());
110 Cell* adding =
new Cell(cell, no_value);
120 push_back(
new Cell(&ptr, &remain,
true));
129 auto it = cbegin() + idx;
138 auto it = cend() - idx;
149 #ifdef SWC_IMPL_SOURCE
153 #endif // swcdb_db_Cells_Result_h
SWC_CAN_INLINE Result(Result &&other) noexcept
Cell * takeout_end(size_t idx)
The SWC-DB C++ namespace 'SWC'.
Result(const Result &other)=delete
Cell * takeout_begin(size_t idx)
Result & operator=(const Result &other)=delete
std::vector< Cell * > Vec
void write_and_free(DynamicBuffer &cells, uint32_t &cell_count, Interval &intval, uint32_t threshold, uint32_t max_cells)
constexpr SWC_CAN_INLINE size_t encoded_length(bool no_value=false) const noexcept
void write(DynamicBuffer &cells) const
void print(std::ostream &out, Types::Column col_type=Types::Column::PLAIN, bool with_cells=false) const
SWC_CAN_INLINE Result(const uint64_t ttl_ns=0) noexcept
constexpr SWC_CAN_INLINE size_t size_bytes() const noexcept
void add(const Cell &cell, bool no_value=false)