![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
#include <dbwrapper.h>
Public Member Functions | |
| CDBWrapper (const DBParams ¶ms) | |
| ~CDBWrapper () | |
| CDBWrapper (const CDBWrapper &)=delete | |
| CDBWrapper & | operator= (const CDBWrapper &)=delete |
| template<typename K, typename V> | |
| bool | Read (const K &key, V &value) const |
| template<typename K, typename V> | |
| void | Write (const K &key, const V &value, bool fSync=false) |
| template<typename K> | |
| bool | Exists (const K &key) const |
| template<typename K> | |
| void | Erase (const K &key, bool fSync=false) |
| void | WriteBatch (CDBBatch &batch, bool fSync=false) |
| void | CompactFull () |
| Perform a blocking full compaction of the underlying LevelDB. | |
| std::optional< std::string > | GetProperty (const std::string &property) const |
| Return a LevelDB property value, if available. | |
| size_t | DynamicMemoryUsage () const |
| CDBIterator * | NewIterator () |
| bool | IsEmpty () |
| Return true if the database managed by this class contains no entries. | |
| template<typename K> | |
| size_t | EstimateSize (const K &key_begin, const K &key_end) const |
Private Member Functions | |
| std::optional< std::string > | ReadImpl (std::span< const std::byte > key) const |
| bool | ExistsImpl (std::span< const std::byte > key) const |
| size_t | EstimateSizeImpl (std::span< const std::byte > key1, std::span< const std::byte > key2) const |
| auto & | DBContext () const LIFETIMEBOUND |
Private Attributes | |
| std::unique_ptr< LevelDBContext > | m_db_context |
| holds all leveldb-specific fields of this class | |
| std::string | m_name |
| the name of this database | |
| Obfuscation | m_obfuscation |
| optional XOR-obfuscation of the database | |
Static Private Attributes | |
| static const std::string | OBFUSCATION_KEY {"\000obfuscate_key", 14} |
| obfuscation key storage key, null-prefixed to avoid collisions | |
Friends | |
| const Obfuscation & | dbwrapper_private::GetObfuscation (const CDBWrapper &) |
Definition at line 178 of file dbwrapper.h.
| CDBWrapper::CDBWrapper | ( | const DBParams & | params | ) |
Definition at line 217 of file dbwrapper.cpp.
| CDBWrapper::~CDBWrapper | ( | ) |
|
delete |
| void CDBWrapper::CompactFull | ( | ) |
Perform a blocking full compaction of the underlying LevelDB.
Definition at line 300 of file dbwrapper.cpp.
|
inlineprivate |
| size_t CDBWrapper::DynamicMemoryUsage | ( | ) | const |
Definition at line 302 of file dbwrapper.cpp.
|
inline |
Definition at line 244 of file dbwrapper.h.
|
inline |
|
private |
Definition at line 341 of file dbwrapper.cpp.
|
inline |
Definition at line 235 of file dbwrapper.h.
|
private |
Definition at line 326 of file dbwrapper.cpp.
| std::optional< std::string > CDBWrapper::GetProperty | ( | const std::string & | property | ) | const |
Return a LevelDB property value, if available.
Definition at line 294 of file dbwrapper.cpp.
| bool CDBWrapper::IsEmpty | ( | ) |
Return true if the database managed by this class contains no entries.
Definition at line 351 of file dbwrapper.cpp.
| CDBIterator * CDBWrapper::NewIterator | ( | ) |
Definition at line 367 of file dbwrapper.cpp.
|
delete |
|
inline |
Definition at line 207 of file dbwrapper.h.
|
private |
Definition at line 312 of file dbwrapper.cpp.
|
inline |
Definition at line 227 of file dbwrapper.h.
| void CDBWrapper::WriteBatch | ( | CDBBatch & | batch, |
| bool | fSync = false ) |
Definition at line 278 of file dbwrapper.cpp.
|
friend |
|
private |
holds all leveldb-specific fields of this class
Definition at line 183 of file dbwrapper.h.
|
private |
the name of this database
Definition at line 186 of file dbwrapper.h.
|
private |
optional XOR-obfuscation of the database
Definition at line 189 of file dbwrapper.h.
|
inlinestaticprivate |
obfuscation key storage key, null-prefixed to avoid collisions
Definition at line 192 of file dbwrapper.h.