Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::lmdblib::LMDBDatabase Class Reference

#include <lmdb_database.hpp>

Public Types

using Ptr = std::unique_ptr< LMDBDatabase >
 
using SharedPtr = std::shared_ptr< LMDBDatabase >
 

Public Member Functions

 LMDBDatabase (LMDBEnvironment::SharedPtr env, const LMDBDatabaseCreationTransaction &transaction, const std::string &name, bool integerKeys=false, bool reverseKeys=false, bool duplicateKeysPermitted=false, MDB_cmp_func *cmp=nullptr)
 
 LMDBDatabase (const LMDBDatabase &other)=delete
 
 LMDBDatabase (LMDBDatabase &&other)=delete
 
LMDBDatabaseoperator= (const LMDBDatabase &other)=delete
 
LMDBDatabaseoperator= (LMDBDatabase &&other)=delete
 
 ~LMDBDatabase ()
 
const MDB_dbi & underlying () const
 
const std::string & name () const
 
bool duplicate_keys_permitted () const
 
DBStats get_stats (LMDBReadTransaction &tx)
 

Private Attributes

std::string dbName
 
bool duplicateKeysPermitted
 
MDB_dbi _dbi
 
LMDBEnvironment::SharedPtr environment
 

Detailed Description

RAII wrapper atound the opening and closing of an LMDB database Contains a reference to its LMDB environment

Definition at line 13 of file lmdb_database.hpp.

Member Typedef Documentation

◆ Ptr

using bb::lmdblib::LMDBDatabase::Ptr = std::unique_ptr<LMDBDatabase>

Definition at line 15 of file lmdb_database.hpp.

◆ SharedPtr

Definition at line 16 of file lmdb_database.hpp.

Constructor & Destructor Documentation

◆ LMDBDatabase() [1/3]

bb::lmdblib::LMDBDatabase::LMDBDatabase ( LMDBEnvironment::SharedPtr  env,
const LMDBDatabaseCreationTransaction transaction,
const std::string &  name,
bool  integerKeys = false,
bool  reverseKeys = false,
bool  duplicateKeysPermitted = false,
MDB_cmp_func *  cmp = nullptr 
)

Definition at line 11 of file lmdb_database.cpp.

◆ LMDBDatabase() [2/3]

bb::lmdblib::LMDBDatabase::LMDBDatabase ( const LMDBDatabase other)
delete

◆ LMDBDatabase() [3/3]

bb::lmdblib::LMDBDatabase::LMDBDatabase ( LMDBDatabase &&  other)
delete

◆ ~LMDBDatabase()

bb::lmdblib::LMDBDatabase::~LMDBDatabase ( )

Definition at line 38 of file lmdb_database.cpp.

Member Function Documentation

◆ duplicate_keys_permitted()

bool bb::lmdblib::LMDBDatabase::duplicate_keys_permitted ( ) const

Definition at line 53 of file lmdb_database.cpp.

◆ get_stats()

DBStats bb::lmdblib::LMDBDatabase::get_stats ( LMDBReadTransaction tx)

Definition at line 58 of file lmdb_database.cpp.

◆ name()

const std::string & bb::lmdblib::LMDBDatabase::name ( ) const

Definition at line 48 of file lmdb_database.cpp.

◆ operator=() [1/2]

LMDBDatabase & bb::lmdblib::LMDBDatabase::operator= ( const LMDBDatabase other)
delete

◆ operator=() [2/2]

LMDBDatabase & bb::lmdblib::LMDBDatabase::operator= ( LMDBDatabase &&  other)
delete

◆ underlying()

const MDB_dbi & bb::lmdblib::LMDBDatabase::underlying ( ) const

Definition at line 43 of file lmdb_database.cpp.

Member Data Documentation

◆ _dbi

MDB_dbi bb::lmdblib::LMDBDatabase::_dbi
private

Definition at line 41 of file lmdb_database.hpp.

◆ dbName

std::string bb::lmdblib::LMDBDatabase::dbName
private

Definition at line 39 of file lmdb_database.hpp.

◆ duplicateKeysPermitted

bool bb::lmdblib::LMDBDatabase::duplicateKeysPermitted
private

Definition at line 40 of file lmdb_database.hpp.

◆ environment

LMDBEnvironment::SharedPtr bb::lmdblib::LMDBDatabase::environment
private

Definition at line 42 of file lmdb_database.hpp.


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