|
lmdb++
|
Resource class for MDB_env* handles. More...
#include <lmdb++.h>
Public Member Functions | |
| env (MDB_env *const handle) noexcept | |
| Constructor. | |
| env (env &&other) noexcept | |
| Move constructor. | |
| env & | operator= (env &&other) noexcept |
| Move assignment operator. | |
| ~env () noexcept | |
| Destructor. | |
| operator MDB_env * () const noexcept | |
| Returns the underlying MDB_env* handle. | |
| MDB_env * | handle () const noexcept |
| Returns the underlying MDB_env* handle. | |
| void | sync (const bool force=true) |
| Flushes data buffers to disk. | |
| void | close () noexcept |
| Closes this environment, releasing the memory map. | |
| int | reader_check () |
| env & | open (const char *const path, const unsigned int flags=default_flags, const modemode modemode=default_mode) |
| Opens this environment. | |
| env & | set_flags (const unsigned int flags, const bool onoff=true) |
| env & | set_mapsize (const std::size_t size) |
| env & | set_max_readers (const unsigned int count) |
| env & | set_max_dbs (const MDB_dbi count) |
| mdb_filehandle_t | get_fd () |
| std::string_view | get_internal_map () |
| @notice WARNING: This is a function to access LMDB's internal memory map, use at your own risk! | |
Static Public Member Functions | |
| static env | create (const unsigned int flags=default_flags) |
| Creates a new LMDB environment. | |
Static Public Attributes | |
| static constexpr unsigned int | default_flags = 0 |
| static constexpr mode | default_mode = 0644 |
Protected Attributes | |
| MDB_env * | _handle {nullptr} |
Resource class for MDB_env* handles.
|
inlinenoexcept |
Constructor.
| handle | a valid MDB_env* handle |
|
inlinenoexcept |
Move constructor.
|
inlinenoexcept |
Destructor.
|
inlinenoexcept |
Closes this environment, releasing the memory map.
|
inlinestatic |
Creates a new LMDB environment.
| flags |
| lmdb::error | on failure |
|
inline |
|
inline |
@notice WARNING: This is a function to access LMDB's internal memory map, use at your own risk!
|
inlinenoexcept |
Returns the underlying MDB_env* handle.
|
inline |
Opens this environment.
| path | |
| flags | |
| mode |
| lmdb::error | on failure |
|
inlinenoexcept |
Returns the underlying MDB_env* handle.
|
inline |
|
inline |
| flags | |
| onoff |
| lmdb::error | on failure |
|
inline |
| size |
| lmdb::error | on failure |
|
inline |
| count |
| lmdb::error | on failure |
|
inline |
| count |
| lmdb::error | on failure |
|
inline |
Flushes data buffers to disk.
| force |
| lmdb::error | on failure |
|
protected |
|
staticconstexpr |
|
staticconstexpr |