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::Schema Class Referencefinal

#include <swcdb/db/Columns/Schema.h>

+ Inheritance diagram for SWC::DB::Schema:
+ Collaboration diagram for SWC::DB::Schema:

Public Types

typedef std::shared_ptr< SchemaPtr
 
typedef Core::Vector< std::string > Tags
 

Public Member Functions

SWC_CAN_INLINE Schema () noexcept
 
 Schema (const Schema &other)
 
 Schema (const uint8_t **bufp, size_t *remainp)
 
 ~Schema () noexcept
 
bool SWC_PURE_FUNC equal (const Ptr &other, bool with_rev=true) const noexcept
 
uint32_t SWC_PURE_FUNC encoded_length () const noexcept
 
void encode (uint8_t **bufp) const
 
void display (std::ostream &out) const
 
SWC_CAN_INLINE std::string to_string () const
 
void print (std::ostream &out) const
 
- Public Member Functions inherited from SWC::DB::SchemaPrimitives
SWC_CAN_INLINE SchemaPrimitives () noexcept
 
SWC_CAN_INLINE SchemaPrimitives (const SchemaPrimitives &other) noexcept
 
SWC_CAN_INLINE SchemaPrimitives (const uint8_t **bufp, size_t *remainp)
 
SWC_CAN_INLINE uint32_t encoded_length () const noexcept
 
SWC_CAN_INLINE void encode (uint8_t **bufp) const
 
SWC_CAN_INLINE void decode (const uint8_t **bufp, size_t *remainp)
 
SWC_CAN_INLINE bool equal (const SchemaPrimitives &other, bool with_rev=true) const noexcept
 

Static Public Member Functions

static SWC_CAN_INLINE Ptr make ()
 
static SWC_CAN_INLINE Ptr make (const Ptr &other)
 
static SWC_CAN_INLINE Ptr make (const uint8_t **bufp, size_t *remainp)
 

Public Attributes

std::string col_name
 
Tags tags
 
- Public Attributes inherited from SWC::DB::SchemaPrimitives
cid_t cid
 
int64_t revision
 
uint32_t cell_versions
 
uint32_t cell_ttl
 
uint32_t blk_size
 
uint32_t blk_cells
 
uint32_t cs_size
 
Types::KeySeq col_seq
 
Types::Column col_type
 
Types::Encoder blk_encoding
 
uint8_t cs_replication
 
uint8_t cs_max
 
uint8_t log_rollout_ratio
 
uint8_t log_compact_cointervaling
 
uint8_t log_fragment_preload
 
uint8_t compact_percent
 

Additional Inherited Members

- Static Public Attributes inherited from SWC::DB::SchemaPrimitives
static constexpr const cid_t NO_CID = 0
 

Detailed Description

Definition at line 182 of file Schema.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<Schema> SWC::DB::Schema::Ptr

Definition at line 185 of file Schema.h.

◆ Tags

typedef Core::Vector<std::string> SWC::DB::Schema::Tags

Definition at line 186 of file Schema.h.

Constructor & Destructor Documentation

◆ Schema() [1/3]

SWC_CAN_INLINE SWC::DB::Schema::Schema ( )
inlinenoexcept

Definition at line 204 of file Schema.h.

Referenced by make().

+ Here is the caller graph for this function:

◆ Schema() [2/3]

SWC::DB::Schema::Schema ( const Schema other)

Definition at line 13 of file Schema.cc.

◆ Schema() [3/3]

SWC::DB::Schema::Schema ( const uint8_t **  bufp,
size_t *  remainp 
)

Definition at line 32 of file Schema.cc.

◆ ~Schema()

SWC::DB::Schema::~Schema ( )
noexcept

Definition at line 38 of file Schema.cc.

Member Function Documentation

◆ display()

◆ encode()

void SWC::DB::Schema::encode ( uint8_t **  bufp) const

Definition at line 49 of file Schema.cc.

References col_name, SWC::DB::SchemaPrimitives::encode(), SWC::Serialization::encode_bytes(), SWC::Serialization::encode_vi32(), SWC::Core::Vector< T, SizeT, GROW_SZ >::size(), and tags.

+ Here is the call graph for this function:

◆ encoded_length()

uint32_t SWC::DB::Schema::encoded_length ( ) const
noexcept

Definition at line 40 of file Schema.cc.

References col_name, SWC::DB::SchemaPrimitives::encoded_length(), SWC::Serialization::encoded_length_bytes(), SWC::Serialization::encoded_length_vi32(), SWC::Core::Vector< T, SizeT, GROW_SZ >::size(), and tags.

+ Here is the call graph for this function:

◆ equal()

bool SWC::DB::Schema::equal ( const Ptr other,
bool  with_rev = true 
) const
noexcept

Definition at line 57 of file Schema.cc.

References SWC::DB::SchemaPrimitives::equal(), and SWC::Condition::str_eq().

+ Here is the call graph for this function:

◆ make() [1/3]

static SWC_CAN_INLINE Ptr SWC::DB::Schema::make ( )
inlinestatic

Definition at line 189 of file Schema.h.

References Schema().

Referenced by SWC::Manager::MngdColumns::create(), SWC::Utils::LoadGenerator::generate(), SWC::Common::Files::Schema::load(), SWC::ThriftBroker::AppHandler::mng_column(), SWC::client::SQL::ColumnSchema::read_schema_options(), SWC::Manager::MngdColumns::require_sync(), SWC::Manager::Schemas::store_load(), and SWC::Manager::MngdColumns::update().

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

◆ make() [2/3]

static SWC_CAN_INLINE Ptr SWC::DB::Schema::make ( const Ptr other)
inlinestatic

Definition at line 194 of file Schema.h.

References Schema().

+ Here is the call graph for this function:

◆ make() [3/3]

static SWC_CAN_INLINE Ptr SWC::DB::Schema::make ( const uint8_t **  bufp,
size_t *  remainp 
)
inlinestatic

Definition at line 199 of file Schema.h.

References Schema().

+ Here is the call graph for this function:

◆ print()

void SWC::DB::Schema::print ( std::ostream &  out) const

Definition at line 97 of file Schema.cc.

References display().

+ Here is the call graph for this function:

◆ to_string()

SWC_CAN_INLINE std::string SWC::DB::Schema::to_string ( ) const
inline

Definition at line 222 of file Schema.h.

References display().

+ Here is the call graph for this function:

Member Data Documentation

◆ col_name

std::string SWC::DB::Schema::col_name

Definition at line 234 of file Schema.h.

Referenced by display(), encode(), encoded_length(), and SWC::DB::Schemas::matching().

◆ tags

Tags SWC::DB::Schema::tags

Definition at line 235 of file Schema.h.

Referenced by display(), encode(), encoded_length(), and SWC::DB::Schemas::matching().


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