|
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.
16 namespace SWC {
namespace Ranger {
28 uint8_t* checksum_data_ptr = dst_buf.
ptr;
30 uint8_t* checksum_header_ptr = dst_buf.
ptr;
33 const uint8_t* start_data_ptr = dst_buf.
ptr;
43 write(input, cellstores);
49 cellstores.
range->get_path(DB::RangeBase::RANGE_FILE),
62 const uint8_t *ptr_end = *ptr+*remain;
63 cellstores.
decode(err, ptr, remain);
76 cellstores.
range->get_path(DB::RangeBase::RANGE_FILE),
80 const uint8_t *ptr = read_buf.
base;
81 size_t remain = read_buf.
size;
94 read(err, &ptr, &sz, cellstores);
102 if(err || cellstores.
empty()) {
105 if(!err && !cellstores.
empty())
106 save(err, cellstores);
uint32_t SWC_PURE_FUNC encoded_length() const
void save(int &err, CellStore::Readers &cellstores)
constexpr SWC_CAN_INLINE int code() const noexcept
#define SWC_LOGF(priority, fmt,...)
#define SWC_LOG_OUT(pr, _code_)
SWC_CAN_INLINE void encode_i32(uint8_t **bufp, uint32_t val) noexcept
static SWC_CAN_INLINE FS::Interface::Ptr & interface() noexcept
static SWC_CAN_INLINE Ptr make_ptr(const std::string &filepath, uint32_t flags, int32_t fd=-1, uint64_t pos=0)
SWC_CAN_INLINE bool checksum_i32_chk(uint32_t checksum, const uint8_t *base, uint32_t len)
SWC_CAN_INLINE void ensure(size_t len)
static void read(DB::RgrData &data, int &err, const std::string &filepath)
void load(int &err, CellStore::Readers &cellstores)
constexpr SWC_CAN_INLINE void encode_i8(uint8_t **bufp, uint8_t val) noexcept
static const uint8_t HEADER_OFFSET_CHKSUM
constexpr SWC_CAN_INLINE bool empty() const noexcept
#define SWC_CURRENT_EXCEPTION(_msg_)
The SWC-DB C++ namespace 'SWC'.
void load_from_path(int &err)
void decode(int &err, const uint8_t **ptr, size_t *remain)
void write(DynamicBuffer &dst_buf, CellStore::Readers &cellstores)
void save(int &err, const DB::Schema::Ptr &schema, uint8_t replication=0)
void write(SWC::DynamicBuffer &dst_buf, const DB::Schema::Ptr &schema)
SWC_CAN_INLINE void checksum_i32(const uint8_t *start, size_t len, uint8_t **ptr) noexcept
void encode(uint8_t **ptr) const
void read(int &err, const uint8_t **ptr, size_t *remain, CellStore::Readers &cellstores)
static const uint8_t HEADER_SIZE
constexpr SWC_CAN_INLINE uint8_t decode_i8(const uint8_t **bufp, size_t *remainp)
SWC_CAN_INLINE uint32_t decode_i32(const uint8_t **bufp, size_t *remainp)