 |
SWC-DB
v0.5.11 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.
6 #ifndef swcdb_db_client_Query_Update_Handlers_Base_h
7 #define swcdb_db_client_Query_Update_Handlers_Base_h
16 namespace SWC {
namespace client {
namespace Query {
namespace Update {
25 class Base :
public std::enable_shared_from_this<Base> {
27 typedef std::shared_ptr<Base>
Ptr;
32 typedef std::shared_ptr<Column>
Ptr;
37 virtual void print(std::ostream& out) = 0;
43 virtual
bool empty() noexcept = 0;
45 virtual
size_t size() noexcept = 0;
52 bool start_key=false) = 0;
55 const DB::Cell::Key& upto_key,
56 const DB::Cell::Key& from_key,
57 uint32_t skip,
bool malformed) = 0;
61 virtual
void add(const DB::Cells::Cell& cell,
bool finalized=false) = 0;
63 virtual
bool get_buff(const DB::Cell::Key& key_start,
64 const DB::Cell::Key& key_end,
73 const DB::Cell::Key& key_end,
93 virtual void error(
int err) noexcept = 0;
95 virtual int error() noexcept = 0;
151 virtual void error(
int err) noexcept {
171 for(
auto colp : cols)
183 if(colp && !colp->
empty())
207 #endif // swcdb_db_client_Query_Update_Handlers_Base_h
constexpr SWC_CAN_INLINE bool compare_exchange_weak(T &at, T value) noexcept
virtual size_t size() noexcept=0
virtual bool requires_commit() noexcept=0
virtual bool empty() noexcept=0
std::shared_ptr< Base > Ptr
SWC_CAN_INLINE void commit(const cid_t cid)
virtual size_t size_bytes() noexcept=0
Core::Atomic< uint32_t > timeout_ratio
std::shared_ptr< Column > Ptr
Core::Vector< Column * > Colms
virtual size_t size_bytes() noexcept=0
virtual void next(Colms &cols) noexcept=0
void commit(Column *colp)
constexpr SWC_CAN_INLINE void store(T v) noexcept
SWC_CAN_INLINE DynamicBuffer::Ptr get_buff(size_t buff_sz, bool &more)
Core::Atomic< uint32_t > buff_sz
virtual int error() noexcept=0
virtual DB::Cell::Key::Ptr get_key_next(const DB::Cell::Key &eval_key, bool start_key=false)=0
const Clients::Flag executor
The SWC-DB C++ namespace 'SWC'.
Core::CompletionCounter< uint64_t > completion
SWC_CAN_INLINE Base(const Clients::Ptr &a_clients, Clients::Flag a_executor=Clients::Flag::DEFAULT) noexcept
virtual DB::Types::KeySeq get_sequence() const noexcept=0
void default_executor(Column *colp)
virtual cid_t get_cid() const noexcept=0
Core::DynamicBuffer DynamicBuffer
virtual bool get_buff(const DB::Cell::Key &key_start, const DB::Cell::Key &key_end, size_t buff_sz, bool &more, DynamicBuffer &cells_buff)=0
SWC_CAN_INLINE Column() noexcept
Core::Atomic< size_t > m_resend_cells
virtual void print(std::ostream &out)=0
constexpr SWC_CAN_INLINE T exchange(T value) noexcept
virtual int error() noexcept
Core::Atomic< uint8_t > buff_ahead
Core::Atomic< uint32_t > timeout
SWC_CAN_INLINE size_t get_resend_count(bool reset=true) noexcept
virtual DB::Cell::Key::Ptr get_first_key()=0
constexpr SWC_CAN_INLINE void increment(CountT v=1) noexcept
constexpr SWC_CAN_INLINE T load() const noexcept
virtual void error(int err) noexcept=0
virtual void _execute(Column *colp)
std::shared_ptr< BufferDyn > Ptr
virtual size_t add(const DynamicBuffer &cells, const DB::Cell::Key &upto_key, const DB::Cell::Key &from_key, uint32_t skip, bool malformed)=0
constexpr SWC_CAN_INLINE T fetch_add(T v) noexcept
Core::Atomic< int > state_error
virtual bool valid() noexcept=0
SWC_CAN_INLINE void add_resend_count(size_t count) noexcept
virtual bool empty() noexcept=0
virtual void response(int err=Error::OK)=0