tests for transaction RAII behaviour, transaction documentation, minor doc fixes
All checks were successful
Main LMDBAL workfow / Archlinux (push) Successful in 37s

This commit is contained in:
Blue 2023-10-18 12:44:53 -03:00
parent de741eda21
commit 6b348023bb
Signed by: blue
GPG key ID: 9B203B252A63EE38
8 changed files with 215 additions and 12 deletions

View file

@ -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