#include <swcdb/db/Columns/Schemas.h>
Classes | |
struct | Pattern |
struct | SelectorPatterns |
struct | TagsPattern |
Public Types | |
typedef Core::Vector< Pattern > | NamePatterns |
Public Member Functions | |
SWC_CAN_INLINE | Schemas () noexcept |
SWC_CAN_INLINE | ~Schemas () noexcept |
uint64_t | size () |
void | add (int &err, const Schema::Ptr &schema) |
void | remove (cid_t cid) |
void | replace (const Schema::Ptr &schema) |
Schema::Ptr | get (cid_t cid) noexcept |
Schema::Ptr | get (const std::string &name) noexcept |
void | all (SchemasVec &entries) |
void | matching (const SelectorPatterns &patterns, SchemasVec &entries, bool no_sys=true) |
void | reset () |
Protected Member Functions | |
void | _add (int &err, const Schema::Ptr &schema) |
void | _remove (cid_t cid) |
void | _replace (const Schema::Ptr &schema) |
Schema::Ptr | _get (cid_t cid) const noexcept |
Schema::Ptr | _get (const std::string &name) const noexcept |
Protected Attributes | |
Core::MutexSptd | m_mutex |
Private Types | |
using | Map = std::unordered_map< cid_t, Schema::Ptr > |
|
private |
|
inlinenoexcept |
|
inlinenoexcept |
|
protected |
Definition at line 24 of file Schemas.cc.
References SWC::Error::COLUMN_SCHEMA_NAME_EXISTS, SWC::LOG_WARN, SWC::Error::print(), SWC_LOG_OSTREAM, and SWC_LOG_OUT.
Referenced by add().
|
protectednoexcept |
Definition at line 61 of file Schemas.cc.
|
protectednoexcept |
Definition at line 71 of file Schemas.cc.
References SWC::Condition::str_eq().
|
protected |
Definition at line 39 of file Schemas.cc.
Referenced by remove().
|
protected |
Definition at line 50 of file Schemas.cc.
Referenced by replace().
void SWC::DB::Schemas::add | ( | int & | err, |
const Schema::Ptr & | schema | ||
) |
Definition at line 19 of file Schemas.cc.
References _add(), and m_mutex.
Referenced by SWC::Manager::MngdColumns::create(), SWC::Comm::Protocol::Mngr::Handler::MngrColumnGet::handle(), and SWC::Manager::MngdColumns::initialize().
void SWC::DB::Schemas::all | ( | SchemasVec & | entries | ) |
Definition at line 79 of file Schemas.cc.
References m_mutex, SWC::Core::Vector< T, SizeT, GROW_SZ >::push_back(), SWC::Core::Vector< T, SizeT, GROW_SZ >::reserve(), size, and SWC::Core::Vector< T, SizeT, GROW_SZ >::size().
Referenced by SWC::Comm::Protocol::Mngr::Handler::column_list(), SWC::Manager::MngdColumns::columns_load(), and SWC::Manager::Schemas::store_create().
|
noexcept |
Definition at line 56 of file Schemas.cc.
Referenced by SWC::Manager::MngdColumns::create(), SWC::Comm::Protocol::Mngr::Handler::get_schema(), SWC::Manager::MngdColumns::run_actions(), SWC::Manager::MngdColumns::update(), SWC::Manager::MngdColumns::update_status(), and SWC::Manager::MngdColumns::update_status_ack().
|
noexcept |
Definition at line 66 of file Schemas.cc.
void SWC::DB::Schemas::matching | ( | const SelectorPatterns & | patterns, |
SchemasVec & | entries, | ||
bool | no_sys = true |
||
) |
Definition at line 94 of file Schemas.cc.
References SWC::DB::Schema::col_name, SWC::DB::Schemas::TagsPattern::comp, SWC::Condition::is_matching(), SWC::Condition::is_matching_extended(), m_mutex, SWC::DB::Schemas::SelectorPatterns::names, SWC::Core::Vector< T, SizeT, GROW_SZ >::push_back(), SWC::Core::Vector< T, SizeT, GROW_SZ >::resize(), SWC::Condition::SBS, SWC::Core::Vector< T, SizeT, GROW_SZ >::size(), SWC::Condition::SPS, SWC::DB::Types::SystemColumn::SYS_CID_END, SWC::DB::Schema::tags, and SWC::DB::Schemas::SelectorPatterns::tags.
Referenced by SWC::Comm::Protocol::Mngr::Handler::column_list().
void SWC::DB::Schemas::remove | ( | cid_t | cid | ) |
Definition at line 34 of file Schemas.cc.
References _remove(), and m_mutex.
Referenced by SWC::Manager::MngdColumns::remove(), and SWC::Manager::MngdColumns::update_status_ack().
void SWC::DB::Schemas::replace | ( | const Schema::Ptr & | schema | ) |
Definition at line 45 of file Schemas.cc.
References _replace(), and m_mutex.
Referenced by SWC::Manager::Schemas::store_load(), SWC::Manager::MngdColumns::update(), and SWC::Manager::MngdColumns::update_status().
void SWC::DB::Schemas::reset | ( | ) |
Definition at line 305 of file Schemas.cc.
References m_mutex.
Referenced by SWC::Manager::MngdColumns::change_active(), SWC::Manager::MngdColumns::initialize(), and SWC::Manager::MngdColumns::reset().
uint64_t SWC::DB::Schemas::size | ( | ) |
Definition at line 14 of file Schemas.cc.
Referenced by SWC::Manager::Schemas::store_create().
|
protected |