SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
Comparators.h File Reference
#include "swcdb/core/Compat.h"
#include <cmath>
#include <re2/re2.h>
+ Include dependency graph for Comparators.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 SWC
 The SWC-DB C++ namespace 'SWC'.
 
 SWC::Condition
 The SWC-DB Comparators C++ namespace 'SWC::Condition'.
 

Enumerations

enum  SWC::Condition::Comp : uint8_t {
  SWC::Condition::NONE = 0x00,
  SWC::Condition::PF = 0x01,
  SWC::Condition::GT = 0x02,
  SWC::Condition::GE = 0x03,
  SWC::Condition::EQ = 0x04,
  SWC::Condition::LE = 0x05,
  SWC::Condition::LT = 0x06,
  SWC::Condition::NE = 0x07,
  SWC::Condition::RE = 0x08,
  SWC::Condition::VGT = 0x09,
  SWC::Condition::VGE = 0x0A,
  SWC::Condition::VLE = 0x0B,
  SWC::Condition::VLT = 0x0C,
  SWC::Condition::SBS = 0x0D,
  SWC::Condition::SPS = 0x0E,
  SWC::Condition::POSBS = 0x0F,
  SWC::Condition::POSPS = 0x10,
  SWC::Condition::FOSBS = 0x11,
  SWC::Condition::FOSPS = 0x12,
  SWC::Condition::FIP = 0x13,
  SWC::Condition::FI = 0x14
}
 

Functions

Comp SWC::Condition::from (const char **buf, uint32_t *remainp, uint8_t extended=0x00) noexcept
 
const char *SWC_CONST_FUNC SWC::Condition::to_string (Comp comp) noexcept
 
SWC_CAN_INLINE const char * SWC::Condition::to_string (uint8_t comp)
 
SWC_CAN_INLINE Comp SWC::Condition::condition_lexic (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE Comp SWC::Condition::condition_volume (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE Comp SWC::Condition::condition (bool vol, const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::pf (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::gt_lexic (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::gt_volume (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::ge_lexic (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::ge_volume (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::eq (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::le_lexic (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::le_volume (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::lt_lexic (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::lt_volume (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::ne (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
bool SWC::Condition::re (const re2::RE2 &regex, const re2::StringPiece &value)
 
SWC_CAN_INLINE bool SWC::Condition::re (const re2::RE2 &regex, const char *v, uint32_t v_len)
 
SWC_CAN_INLINE bool SWC::Condition::re (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len)
 
SWC_CAN_INLINE bool SWC::Condition::sbs (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC_PURE_FUNC SWC::Condition::po_sbs (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC_PURE_FUNC SWC::Condition::fo_sbs (const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len) noexcept
 
SWC_CAN_INLINE bool SWC::Condition::is_matching_lexic (uint8_t comp, const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len)
 
SWC_CAN_INLINE bool SWC::Condition::is_matching_volume (uint8_t comp, const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len)
 
SWC_CAN_INLINE bool SWC::Condition::is_matching_lexic (uint8_t comp, const char *p1, uint32_t p1_len, const char *p2, uint32_t p2_len)
 
SWC_CAN_INLINE bool SWC::Condition::is_matching_volume (uint8_t comp, const char *p1, uint32_t p1_len, const char *p2, uint32_t p2_len)
 
SWC_CAN_INLINE bool SWC::Condition::is_matching (bool volumetric, uint8_t comp, const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len)
 
SWC_CAN_INLINE bool SWC::Condition::is_matching (bool volumetric, uint8_t comp, const char *p1, uint32_t p1_len, const char *p2, uint32_t p2_len)
 
SWC_CAN_INLINE bool SWC::Condition::is_matching_extended (uint8_t comp, const uint8_t *p1, uint32_t p1_len, const uint8_t *p2, uint32_t p2_len)
 
template<typename T >
constexpr SWC_CAN_INLINE bool SWC::Condition::gt (const T p1, const T p2) noexcept
 
template<typename T >
constexpr SWC_CAN_INLINE bool SWC::Condition::ge (const T p1, const T p2) noexcept
 
template<typename T >
constexpr SWC_CAN_INLINE bool SWC::Condition::eq (const T p1, const T p2) noexcept
 
template<typename T >
constexpr SWC_CAN_INLINE bool SWC::Condition::le (const T p1, const T p2) noexcept
 
template<typename T >
constexpr SWC_CAN_INLINE bool SWC::Condition::lt (const T p1, const T p2) noexcept
 
template<typename T >
constexpr SWC_CAN_INLINE bool SWC::Condition::ne (const T p1, const T p2) noexcept
 
template<typename T >
constexpr SWC_CAN_INLINE bool SWC::Condition::sbs (const T p1, const T p2) noexcept
 
template<>
SWC_CAN_INLINE bool SWC::Condition::sbs (const long double p1, const long double p2) noexcept
 
template<typename T >
constexpr SWC_CAN_INLINE bool SWC::Condition::fo_sbs (const T p1, const T p2) noexcept
 
template<>
constexpr SWC_CAN_INLINE bool SWC::Condition::fo_sbs (const long double, const long double) noexcept
 
template<typename T >
SWC_CAN_INLINE bool SWC::Condition::is_matching (uint8_t comp, const T p1, const T p2) noexcept
 

Variables

const uint SWC::Condition::COMP_EXTENDED_VALUE = 0x01
 
const uint SWC::Condition::COMP_EXTENDED_KEY = 0x02
 
const char SWC::Condition::COMP_NONE [] = "none"
 
const char SWC::Condition::COMP_PF [] = "=^"
 
const char SWC::Condition::COMP_GT [] = ">"
 
const char SWC::Condition::COMP_GE [] = ">="
 
const char SWC::Condition::COMP_EQ [] = "=="
 
const char SWC::Condition::COMP_LE [] = "<="
 
const char SWC::Condition::COMP_LT [] = "<"
 
const char SWC::Condition::COMP_NE [] = "!="
 
const char SWC::Condition::COMP_RE [] = "re"
 
const char SWC::Condition::COMP_VGT [] = "v>"
 
const char SWC::Condition::COMP_VGE [] = "v>="
 
const char SWC::Condition::COMP_VLE [] = "v<="
 
const char SWC::Condition::COMP_VLT [] = "v<"
 
const char SWC::Condition::COMP_SBS [] = "%>"
 
const char SWC::Condition::COMP_SPS [] = "<%"
 
const char SWC::Condition::COMP_POSBS [] = "~>"
 
const char SWC::Condition::COMP_POSPS [] = "<~"
 
const char SWC::Condition::COMP_FOSBS [] = "->"
 
const char SWC::Condition::COMP_FOSPS [] = "<-"
 
const char SWC::Condition::COMP_FIP [] = ":<"
 
const char SWC::Condition::COMP_FI [] = ":"