Loading...
Searching...
No Matches
resdb::storage::ResLevelDB Class Reference

#include <leveldb.h>

Inheritance diagram for resdb::storage::ResLevelDB:
resdb::Storage

Public Member Functions

 ResLevelDB (std::optional< LevelDBInfo > config_data=std::nullopt)
 
virtual ~ResLevelDB ()
 
int SetValue (const std::string &key, const std::string &value) override
 
std::string GetValue (const std::string &key) override
 
std::string GetAllValues (void) override
 
std::string GetRange (const std::string &min_key, const std::string &max_key) override
 
int SetValueWithVersion (const std::string &key, const std::string &value, int version) override
 
std::pair< std::string, int > GetValueWithVersion (const std::string &key, int version) override
 
std::map< std::string, std::pair< std::string, int > > GetAllItems () override
 
std::map< std::string, std::pair< std::string, int > > GetKeyRange (const std::string &min_key, const std::string &max_key) override
 
std::vector< std::pair< std::string, int > > GetHistory (const std::string &key, int min_version, int max_version) override
 
std::vector< std::pair< std::string, int > > GetTopHistory (const std::string &key, int top_number) override
 
bool Flush () override
 
- Public Member Functions inherited from resdb::Storage
 Storage ()=default
 
virtual ~Storage ()=default
 

Detailed Description

Definition at line 39 of file leveldb.h.

Constructor & Destructor Documentation

◆ ResLevelDB()

resdb::storage::ResLevelDB::ResLevelDB ( std::optional< LevelDBInfo >  config_data = std::nullopt)

Definition at line 42 of file leveldb.cpp.

◆ ~ResLevelDB()

resdb::storage::ResLevelDB::~ResLevelDB ( )
virtual

Definition at line 73 of file leveldb.cpp.

Member Function Documentation

◆ Flush()

bool resdb::storage::ResLevelDB::Flush ( )
overridevirtual

Reimplemented from resdb::Storage.

Definition at line 137 of file leveldb.cpp.

◆ GetAllItems()

std::map< std::string, std::pair< std::string, int > > resdb::storage::ResLevelDB::GetAllItems ( )
overridevirtual

Implements resdb::Storage.

Definition at line 203 of file leveldb.cpp.

◆ GetAllValues()

std::string resdb::storage::ResLevelDB::GetAllValues ( void  )
overridevirtual

Implements resdb::Storage.

Definition at line 105 of file leveldb.cpp.

◆ GetHistory()

std::vector< std::pair< std::string, int > > resdb::storage::ResLevelDB::GetHistory ( const std::string &  key,
int  min_version,
int  max_version 
)
overridevirtual

Implements resdb::Storage.

Definition at line 246 of file leveldb.cpp.

◆ GetKeyRange()

std::map< std::string, std::pair< std::string, int > > resdb::storage::ResLevelDB::GetKeyRange ( const std::string &  min_key,
const std::string &  max_key 
)
overridevirtual

Implements resdb::Storage.

Definition at line 223 of file leveldb.cpp.

◆ GetRange()

std::string resdb::storage::ResLevelDB::GetRange ( const std::string &  min_key,
const std::string &  max_key 
)
overridevirtual

Implements resdb::Storage.

Definition at line 120 of file leveldb.cpp.

◆ GetTopHistory()

std::vector< std::pair< std::string, int > > resdb::storage::ResLevelDB::GetTopHistory ( const std::string &  key,
int  top_number 
)
overridevirtual

Implements resdb::Storage.

Definition at line 270 of file leveldb.cpp.

◆ GetValue()

std::string resdb::storage::ResLevelDB::GetValue ( const std::string &  key)
overridevirtual

Implements resdb::Storage.

Definition at line 95 of file leveldb.cpp.

◆ GetValueWithVersion()

std::pair< std::string, int > resdb::storage::ResLevelDB::GetValueWithVersion ( const std::string &  key,
int  version 
)
overridevirtual

Implements resdb::Storage.

Definition at line 175 of file leveldb.cpp.

◆ SetValue()

int resdb::storage::ResLevelDB::SetValue ( const std::string &  key,
const std::string &  value 
)
overridevirtual

Implements resdb::Storage.

Definition at line 79 of file leveldb.cpp.

◆ SetValueWithVersion()

int resdb::storage::ResLevelDB::SetValueWithVersion ( const std::string &  key,
const std::string &  value,
int  version 
)
overridevirtual

Implements resdb::Storage.

Definition at line 147 of file leveldb.cpp.