2#ifndef _MDBX_CONTAINERS_TRANSACTION_HPP_INCLUDED
3#define _MDBX_CONTAINERS_TRANSACTION_HPP_INCLUDED
61 MDBX_txn *
handle() const noexcept;
89#ifdef MDBX_CONTAINERS_HEADER_ONLY
Associates MDBX transactions with threads.
TransactionMode m_mode
Current transaction mode.
MDBX_env * m_env
Pointer to the MDBX environment handle.
Transaction(TransactionTracker *registry, MDBX_env *env, TransactionMode mode)
Constructs a new transaction object.
virtual ~Transaction()
Destructor that safely closes or resets the transaction.
void begin()
Starts the transaction.
TransactionTracker * m_registry
void rollback()
Rolls back the transaction.
void commit()
Commits the transaction.
MDBX_txn * m_txn
MDBX transaction handle.
MDBX_txn * handle() const noexcept
Returns the internal MDBX transaction handle.
TransactionMode
Specifies the access mode of a transaction.
@ READ_ONLY
Read-only transaction (no write operations allowed).
@ WRITABLE
Writable transaction (allows inserts, updates, deletes).