tests for transaction RAII behaviour, transaction documentation, minor doc fixes
All checks were successful
Main LMDBAL workfow / Archlinux (push) Successful in 37s
All checks were successful
Main LMDBAL workfow / Archlinux (push) Successful in 37s
This commit is contained in:
parent
de741eda21
commit
6b348023bb
8 changed files with 215 additions and 12 deletions
18
src/base.cpp
18
src/base.cpp
|
@ -216,6 +216,14 @@ void LMDBAL::Base::drop() {
|
|||
/**
|
||||
* \brief Begins read-only transaction
|
||||
*
|
||||
* This is the legitimate way to retrieve LMDBAL::Transaction.
|
||||
* LMDBAL::Transaction is considered runnig right after creation by this method.
|
||||
* You can terminate transaction manually calling LMDBAL::Transaction::terminate
|
||||
* but it's not required, because transaction will be terminated automatically
|
||||
* (if it was not terminated manually) upon the call of the destructor.
|
||||
*
|
||||
* You can not use termitated transaction any more.
|
||||
*
|
||||
* \returns read-only transaction
|
||||
*
|
||||
* \exception LMDBAL::Closed - thrown if the database is closed
|
||||
|
@ -229,6 +237,16 @@ LMDBAL::Transaction LMDBAL::Base::beginReadOnlyTransaction() const {
|
|||
/**
|
||||
* \brief Begins writable transaction
|
||||
*
|
||||
* This is the legitimate way to retrieve LMDBAL::WriteTransaction.
|
||||
* LMDBAL::WriteTransaction is considered runnig right after creation by this method.
|
||||
* You can commit all the changes made by this transaction calling LMDBAL::WriteTransaction::commit.
|
||||
* You can cancel any changes made bu this transaction calling LMDBAL::WriteTransaction::abort
|
||||
* (or LMDBAL::Transaction::terminate which LMDBAL::WriteTransaction inherits),
|
||||
* but it's not required, because transaction will be aborted automatically
|
||||
* (if it was not terminated (committed <b>OR</b> aborted) manually) upon the call of the destructor.
|
||||
*
|
||||
* You can not use termitated transaction any more.
|
||||
*
|
||||
* \returns writable transaction
|
||||
*
|
||||
* \exception LMDBAL::Closed - thrown if the database is closed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue