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::Types Namespace Reference

The SWC-DB Types C++ namespace 'SWC::DB::Types'. More...

Namespaces

 MngrColumn
 
 MngrRange
 
 MngrRangerState
 
 MngrRole
 
 SystemColumn
 

Typedefs

using Encoder = Core::Encoder::Type
 

Enumerations

enum  Column : uint8_t {
  Column::UNKNOWN = 0x0,
  Column::PLAIN = 0x1,
  Column::COUNTER_I64 = 0x2,
  Column::COUNTER_I32 = 0x3,
  Column::COUNTER_I16 = 0x4,
  Column::COUNTER_I8 = 0x5,
  Column::SERIAL = 0x6,
  Column::CELL_DEFINED = 0xf
}
 
enum  KeySeq : uint8_t {
  KeySeq::UNKNOWN = 0,
  KeySeq::LEXIC = 1,
  KeySeq::VOLUME = 2,
  KeySeq::FC_LEXIC = 3,
  KeySeq::FC_VOLUME = 4
}
 
enum  MngrState : uint8_t {
  MngrState::NOTSET = 0,
  MngrState::OFF = 1,
  MngrState::STANDBY = 2,
  MngrState::WANT = 3,
  MngrState::NOMINATED = 4,
  MngrState::ACTIVE = 5
}
 
enum  Range : uint8_t {
  Range::MASTER = 1,
  Range::META = 2,
  Range::DATA = 3
}
 

Functions

bool SWC_CONST_FUNC is_counter (const Column typ) noexcept
 
const char *SWC_CONST_FUNC to_string (Column typ) noexcept
 
Column SWC_PURE_FUNC column_type_from (const std::string &typ) noexcept
 
SWC_CAN_INLINE std::string repr_col_type (int typ)
 
SWC_CAN_INLINE int from_string_col_type (const std::string &typ) noexcept
 
bool SWC_CONST_FUNC is_fc (KeySeq typ) noexcept
 
const char *SWC_CONST_FUNC to_string (KeySeq typ) noexcept
 
KeySeq SWC_PURE_FUNC range_seq_from (const std::string &typ) noexcept
 
SWC_CAN_INLINE std::string repr_range_seq (int typ)
 
SWC_CAN_INLINE int from_string_range_seq (const std::string &typ) noexcept
 
const char *SWC_CONST_FUNC to_string (MngrColumn::State state) noexcept
 
const char *SWC_CONST_FUNC to_string (MngrRange::State state) noexcept
 
const char *SWC_CONST_FUNC to_string (MngrState state) noexcept
 
const char *SWC_CONST_FUNC to_string (Range typ) noexcept
 

Detailed Description

The SWC-DB Types C++ namespace 'SWC::DB::Types'.

Typedef Documentation

◆ Encoder

Definition at line 15 of file Encoder.h.

Enumeration Type Documentation

◆ Column

enum SWC::DB::Types::Column : uint8_t
strong
Enumerator
UNKNOWN 
PLAIN 
COUNTER_I64 
COUNTER_I32 
COUNTER_I16 
COUNTER_I8 
SERIAL 
CELL_DEFINED 

Definition at line 18 of file Column.h.

◆ KeySeq

enum SWC::DB::Types::KeySeq : uint8_t
strong
Enumerator
UNKNOWN 
LEXIC 
VOLUME 
FC_LEXIC 
FC_VOLUME 

Definition at line 13 of file KeySeq.h.

◆ MngrState

enum SWC::DB::Types::MngrState : uint8_t
strong
Enumerator
NOTSET 
OFF 
STANDBY 
WANT 
NOMINATED 
ACTIVE 

Definition at line 14 of file MngrState.h.

◆ Range

enum SWC::DB::Types::Range : uint8_t
strong
Enumerator
MASTER 
META 
DATA 

Definition at line 14 of file Range.h.

Function Documentation

◆ column_type_from()

Column SWC::DB::Types::column_type_from ( const std::string &  typ)
noexcept

Definition at line 59 of file Column.cc.

References SERIAL, SWC::Condition::str_case_eq(), and SWC::DB::Cell::Serial::Value::UNKNOWN.

Referenced by from_string_col_type(), and SWC::client::SQL::ColumnSchema::read_schema_options().

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

◆ from_string_col_type()

SWC_CAN_INLINE int SWC::DB::Types::from_string_col_type ( const std::string &  typ)
noexcept

Definition at line 42 of file Column.h.

References column_type_from().

Referenced by SWC::Config::init_app_options().

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

◆ from_string_range_seq()

SWC_CAN_INLINE int SWC::DB::Types::from_string_range_seq ( const std::string &  typ)
noexcept

Definition at line 34 of file KeySeq.h.

References range_seq_from().

Referenced by SWC::Config::init_app_options().

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

◆ is_counter()

◆ is_fc()

bool SWC::DB::Types::is_fc ( KeySeq  typ)
noexcept

Definition at line 22 of file KeySeq.cc.

References UNKNOWN.

◆ range_seq_from()

KeySeq SWC::DB::Types::range_seq_from ( const std::string &  typ)
noexcept

Definition at line 48 of file KeySeq.cc.

References SWC::Condition::str_case_eq(), and UNKNOWN.

Referenced by from_string_range_seq(), SWC::client::SQL::ColumnSchema::read_schema_options(), and SWC::client::SQL::QuerySelect::read_value().

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

◆ repr_col_type()

SWC_CAN_INLINE std::string SWC::DB::Types::repr_col_type ( int  typ)

Definition at line 37 of file Column.h.

References to_string().

Referenced by SWC::Config::init_app_options().

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

◆ repr_range_seq()

SWC_CAN_INLINE std::string SWC::DB::Types::repr_range_seq ( int  typ)

Definition at line 29 of file KeySeq.h.

References to_string().

Referenced by SWC::Config::init_app_options().

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

◆ to_string() [1/6]

◆ to_string() [2/6]

const char * SWC::DB::Types::to_string ( KeySeq  typ)
noexcept

Definition at line 33 of file KeySeq.cc.

References UNKNOWN.

◆ to_string() [3/6]

const char * SWC::DB::Types::to_string ( MngrColumn::State  state)
noexcept

◆ to_string() [4/6]

◆ to_string() [5/6]

const char * SWC::DB::Types::to_string ( MngrState  state)
noexcept

Definition at line 24 of file MngrState.cc.

References SWC::DB::Types::MngrColumn::NOTSET, and NOTSET.

◆ to_string() [6/6]

const char * SWC::DB::Types::to_string ( Range  typ)
noexcept

Definition at line 21 of file Range.cc.

References MASTER.