Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <lmdb_store.hpp>
Classes | |
struct | PutData |
Public Types | |
using | Ptr = std::unique_ptr< LMDBStore > |
using | SharedPtr = std::shared_ptr< LMDBStore > |
using | WriteTransaction = LMDBWriteTransaction |
using | ReadTransaction = LMDBReadTransaction |
using | Database = LMDBDatabase |
using | Cursor = LMDBCursor |
![]() | |
using | ReadTransaction = LMDBReadTransaction |
using | WriteTransaction = LMDBWriteTransaction |
using | DBCreationTransaction = LMDBDatabaseCreationTransaction |
Private Member Functions | |
void | put (KeyDupValuesVector &toWrite, KeyOptionalValuesVector &toDelete, const LMDBDatabase &db, LMDBWriteTransaction &tx) |
void | get (KeysVector &keys, OptionalValuesVector &values, LMDBDatabase::SharedPtr db) |
Database::SharedPtr | get_database (const std::string &name) |
std::vector< Database::SharedPtr > | get_databases () const |
std::vector< Database::SharedPtr > | get_databases (const std::vector< PutData > &puts) const |
Private Attributes | |
std::mutex | databasesMutex |
std::unordered_map< std::string, LMDBDatabase::SharedPtr > | databases |
Additional Inherited Members | |
![]() | |
std::string | _dbDirectory |
LMDBEnvironment::SharedPtr | _environment |
Implements a basic lmdb store. Consisting of an environment, any number of databases, transactions and cursors
Definition at line 23 of file lmdb_store.hpp.
Definition at line 30 of file lmdb_store.hpp.
Definition at line 29 of file lmdb_store.hpp.
using bb::lmdblib::LMDBStore::Ptr = std::unique_ptr<LMDBStore> |
Definition at line 25 of file lmdb_store.hpp.
Definition at line 28 of file lmdb_store.hpp.
using bb::lmdblib::LMDBStore::SharedPtr = std::shared_ptr<LMDBStore> |
Definition at line 26 of file lmdb_store.hpp.
Definition at line 27 of file lmdb_store.hpp.
bb::lmdblib::LMDBStore::LMDBStore | ( | std::string | directory, |
uint64_t | mapSizeKb, | ||
uint64_t | maxNumReaders, | ||
uint64_t | maxDbs | ||
) |
Definition at line 15 of file lmdb_store.cpp.
|
delete |
|
overridedefault |
Definition at line 37 of file lmdb_store.cpp.
LMDBStore::Cursor::Ptr bb::lmdblib::LMDBStore::create_cursor | ( | ReadTransaction::SharedPtr | tx, |
const std::string & | dbName | ||
) |
Definition at line 179 of file lmdb_store.cpp.
void bb::lmdblib::LMDBStore::get | ( | KeysVector & | keys, |
OptionalValuesVector & | values, | ||
const std::string & | name | ||
) |
Definition at line 112 of file lmdb_store.cpp.
|
private |
Definition at line 137 of file lmdb_store.cpp.
|
private |
Definition at line 51 of file lmdb_store.cpp.
|
private |
Definition at line 61 of file lmdb_store.cpp.
|
private |
Definition at line 72 of file lmdb_store.cpp.
std::pair< uint64_t, uint64_t > bb::lmdblib::LMDBStore::get_stats | ( | std::vector< DBStats > & | stats | ) | const |
Definition at line 87 of file lmdb_store.cpp.
void bb::lmdblib::LMDBStore::open_database | ( | const std::string & | name, |
bool | duplicateKeysPermitted = false |
||
) |
Definition at line 19 of file lmdb_store.cpp.
|
delete |
|
delete |
|
private |
Definition at line 117 of file lmdb_store.cpp.
Definition at line 97 of file lmdb_store.cpp.
|
private |
Definition at line 58 of file lmdb_store.hpp.
|
mutableprivate |
Definition at line 57 of file lmdb_store.hpp.