Resource class for MDB_txn*
handles.
More...
#include <lmdb++.h>
Resource class for MDB_txn*
handles.
- Note
- Instances of this class are movable, but not copyable.
- See also
- http://symas.com/mdb/doc/group__internal.html#structMDB__txn
◆ txn() [1/2]
lmdb::txn::txn |
( |
MDB_txn *const |
handle | ) |
|
|
inlinenoexcept |
Constructor.
- Parameters
-
handle | a valid MDB_txn* handle |
◆ txn() [2/2]
lmdb::txn::txn |
( |
txn && |
other | ) |
|
|
inlinenoexcept |
◆ ~txn()
◆ abort()
void lmdb::txn::abort |
( |
| ) |
|
|
inlinenoexcept |
Aborts this transaction.
- Postcondition
handle() == nullptr
◆ begin()
static txn lmdb::txn::begin |
( |
MDB_env *const |
env, |
|
|
MDB_txn *const |
parent = nullptr , |
|
|
const unsigned int |
flags = default_flags |
|
) |
| |
|
inlinestatic |
Creates a new LMDB transaction.
- Parameters
-
env | the environment handle |
parent | |
flags | |
- Exceptions
-
◆ commit()
void lmdb::txn::commit |
( |
| ) |
|
|
inline |
Commits this transaction.
- Exceptions
-
- Postcondition
handle() == nullptr
◆ env()
MDB_env * lmdb::txn::env |
( |
| ) |
const |
|
inlinenoexcept |
Returns the transaction's MDB_env*
handle.
◆ handle()
MDB_txn * lmdb::txn::handle |
( |
| ) |
const |
|
inlinenoexcept |
Returns the underlying MDB_txn*
handle.
◆ operator MDB_txn *()
lmdb::txn::operator MDB_txn * |
( |
| ) |
const |
|
inlinenoexcept |
Returns the underlying MDB_txn*
handle.
◆ operator=()
txn & lmdb::txn::operator= |
( |
txn && |
other | ) |
|
|
inlinenoexcept |
Move assignment operator.
◆ renew()
void lmdb::txn::renew |
( |
| ) |
|
|
inline |
Renews this read-only transaction.
- Exceptions
-
◆ reset()
void lmdb::txn::reset |
( |
| ) |
|
|
inlinenoexcept |
Resets this read-only transaction.
◆ _handle
MDB_txn* lmdb::txn::_handle {nullptr} |
|
protected |
◆ default_flags
constexpr unsigned int lmdb::txn::default_flags = 0 |
|
staticconstexpr |
The documentation for this class was generated from the following file: