Class mdbx::txn_managed
ClassList > mdbx > txn_managed
Managed database transaction. More...
#include <mdbx.h++>
Inherits the following classes: mdbx::txn
Public Types
| Type | Name |
|---|---|
| typedef MDBX_commit_latency | finalization_latency |
Public Types inherited from mdbx::txn
See mdbx::txn
| Type | Name |
|---|---|
| typedef ::MDBX_cache_result_t | cache_result |
| typedef ::MDBX_cache_status_t | cache_status |
| typedef ::MDBX_canary | canary |
| typedef ::MDBX_gc_info_t | gc_info |
| typedef ::MDBX_txn_info | info |
| typedef ::MDBX_stat | map_stat |
Public Functions
| Type | Name |
|---|---|
| void | abort () Abandon all the operations of the transaction instead of saving ones. |
| void | abort (finalization_latency *) Abandon all the operations of the transaction instead of saving ones with collecting latencies information. |
| void | abort (finalization_latency & latency) Abandon all the operations of the transaction instead of saving ones with collecting latencies information. |
| finalization_latency | abort_get_latency () Abandon all the operations of the transaction instead of saving ones with collecting latencies information. |
| bool | amend (bool dont_wait=false) Starts a writing transaction to amending data in the MVCC-snapshot used by the read-only transaction. |
| bool | checkpoint () Commits all the operations of the transaction and immediately starts next without releasing any locks. |
| bool | checkpoint (finalization_latency * latency) Commits all the operations of the transaction and immediately starts next without releasing any locks. |
| bool | checkpoint (finalization_latency & latency) Commits all the operations of the transaction and immediately starts next without releasing any locks. |
| std::pair< bool, finalization_latency > | checkpoint_get_latency () Commits all the operations of the transaction and immediately starts next without releasing any locks. |
| void | commit () Commits all changes of the transaction into a database with collecting latencies information. |
| void | commit (finalization_latency *) Commits all changes of the transaction into a database with collecting latencies information. |
| void | commit (finalization_latency & latency) Commits all changes of the transaction into a database with collecting latencies information. |
| void | commit_embark_read () Commits all the operations of a transaction into the database and then start read transaction. |
| void | commit_embark_read (finalization_latency * latency) Commits all the operations of a transaction into the database and then start read transaction. |
| void | commit_embark_read (finalization_latency & latency) Commits all the operations of a transaction into the database and then start read transaction. |
| finalization_latency | commit_embark_read_get_latency () Commits all the operations of a transaction into the database and then start read transaction. |
| finalization_latency | commit_get_latency () Commits all changes of the transaction into a database and return latency information. |
| txn_managed & | operator= (txn_managed && other) noexcept |
| txn_managed & | operator= (const txn_managed &) = delete |
| constexpr | txn_managed () noexcept |
| txn_managed (txn_managed &&) = default |
|
| txn_managed (const txn_managed &) = delete |
|
| ~txn_managed () |
Public Functions inherited from mdbx::txn
See mdbx::txn
| Type | Name |
|---|---|
| void | append (map_handle map, const pair & kv, bool multivalue_order_preserved=true) |
| bool | clear_map (const char * name, bool throw_if_absent=false) |
| bool | clear_map (const slice & name, bool throw_if_absent=false) |
| bool | clear_map (const ::std::string_view & name, bool throw_if_absent=false) |
| size_t | close_all_cursors () const Close all cursors. |
| void | copy (const wchar_t * destination, bool compactify, bool force_dynamic_size=false) Copy an MVCC-snapshot of the database to the destination path. |
| void | copy (const ::std::wstring & destination, bool compactify, bool force_dynamic_size=false) Copy an MVCC-snapshot of the database to the destination path. |
| map_handle | create_map (const ::std::string_view & name, const ::mdbx::key_mode key_mode=::mdbx::key_mode::usual, const ::mdbx::value_mode value_mode=::mdbx::value_mode::single) Create new or open existing key-value map. |
| bool | drop_map (const char * name, bool throw_if_absent=false) Drops key-value map using name. |
| bool | drop_map (const slice & name, bool throw_if_absent=false) Drop key-value map. |
| bool | drop_map (const ::std::string_view & name, bool throw_if_absent=false) Drop key-value map. |
| const MDBX_txn * | handle () noexcept const |
| MDBX_txn * | handle () noexcept |
| void | insert (map_handle map, const pair & kv) |
| bool | is_dirty (const slice & item) const Checks whether the given slice is on a dirty page. |
| bool | is_readonly () const Checks whether the transaction is read-only. |
| bool | is_readwrite () const Checks whether the transaction is read-write. |
| map_handle | open_map (const ::std::string_view & name, const ::mdbx::key_mode key_mode=::mdbx::key_mode::usual, const ::mdbx::value_mode value_mode=::mdbx::value_mode::single) const Open existing key-value map. |
| map_handle | open_map_accede (const ::std::string_view & name) const Open existing key-value map. |
| constexpr | operator MDBX_txn * () noexcept |
| constexpr | operator const MDBX_txn * () noexcept const |
| txn & | operator= (const txn &) noexcept |
| void | put (map_handle map, const pair & kv, put_mode mode) |
| size_t | put_multiple_samelength (map_handle map, const slice & key, const VALUE * values_array, size_t values_count, put_mode mode, bool allow_partial=false) |
| void | put_multiple_samelength (map_handle map, const slice & key, const ::std::vector< VALUE > & vector, put_mode mode) |
| bool | rename_map (const char * old_name, const char * new_name, bool throw_if_absent=false) Переименовывает таблицу ключ-значение. |
| bool | rename_map (const ::std::string & old_name, const ::std::string & new_name, bool throw_if_absent=false) Переименовывает таблицу ключ-значение. |
| bool | rename_map (const slice & old_name, const slice & new_name, bool throw_if_absent=false) Переименовывает таблицу ключ-значение. |
| void | rename_map (map_handle map, const ::std::string_view & new_name) Переименовывает таблицу ключ-значение. |
| bool | rename_map (const ::std::string_view & old_name, const ::std::string_view & new_name, bool throw_if_absent=false) Переименовывает таблицу ключ-значение. |
| size_t | size_current () const Returns current write transaction size (i.e. summary volume of dirty pages) in bytes. |
| size_t | size_max () const Returns maximal write transaction size (i.e. limit for summary volume of dirty pages) in bytes. |
| txn_managed | start_nested () Start nested write transaction. |
| txn_managed | start_nested (bool readonly) Start nested transaction. |
| value_result | try_insert (map_handle map, const pair & kv) |
| constexpr | txn () noexcept |
| txn (const txn &) noexcept |
|
| size_t | unbind_all_cursors () const Unbind all cursors. |
| void | upsert (map_handle map, const pair & kv) |
Protected Attributes inherited from mdbx::txn
See mdbx::txn
| Type | Name |
|---|---|
| MDBX_txn * | handle_ = {nullptr} |
Detailed Description
As other managed classes, txn_managed destroys the represented underlying object from the own class destructor, but disallows copying and assignment for instances.
All database operations require a transaction handle. Transactions may be read-only or read-write.
Public Types Documentation
typedef finalization_latency
using mdbx::txn_managed::finalization_latency = MDBX_commit_latency;
Public Functions Documentation
function abort [1/3]
Abandon all the operations of the transaction instead of saving ones.
void mdbx::txn_managed::abort ()
function abort [2/3]
Abandon all the operations of the transaction instead of saving ones with collecting latencies information.
void mdbx::txn_managed::abort (
finalization_latency *
)
function abort [3/3]
Abandon all the operations of the transaction instead of saving ones with collecting latencies information.
inline void mdbx::txn_managed::abort (
finalization_latency & latency
)
function abort_get_latency
Abandon all the operations of the transaction instead of saving ones with collecting latencies information.
inline finalization_latency mdbx::txn_managed::abort_get_latency ()
Returns:
latency information of abort stages.
function amend
Starts a writing transaction to amending data in the MVCC-snapshot used by the read-only transaction.
bool mdbx::txn_managed::amend (
bool dont_wait=false
)
Returns:
The true if writing transaction successfully started and false if read-only one still continue.
function checkpoint [1/3]
Commits all the operations of the transaction and immediately starts next without releasing any locks.
bool mdbx::txn_managed::checkpoint ()
function checkpoint [2/3]
Commits all the operations of the transaction and immediately starts next without releasing any locks.
bool mdbx::txn_managed::checkpoint (
finalization_latency * latency
)
function checkpoint [3/3]
Commits all the operations of the transaction and immediately starts next without releasing any locks.
inline bool mdbx::txn_managed::checkpoint (
finalization_latency & latency
)
function checkpoint_get_latency
Commits all the operations of the transaction and immediately starts next without releasing any locks.
inline std::pair< bool, finalization_latency > mdbx::txn_managed::checkpoint_get_latency ()
Returns:
latency information of commit stages.
function commit [1/3]
Commits all changes of the transaction into a database with collecting latencies information.
void mdbx::txn_managed::commit ()
function commit [2/3]
Commits all changes of the transaction into a database with collecting latencies information.
void mdbx::txn_managed::commit (
finalization_latency *
)
function commit [3/3]
Commits all changes of the transaction into a database with collecting latencies information.
inline void mdbx::txn_managed::commit (
finalization_latency & latency
)
function commit_embark_read [1/3]
Commits all the operations of a transaction into the database and then start read transaction.
void mdbx::txn_managed::commit_embark_read ()
function commit_embark_read [2/3]
Commits all the operations of a transaction into the database and then start read transaction.
void mdbx::txn_managed::commit_embark_read (
finalization_latency * latency
)
function commit_embark_read [3/3]
Commits all the operations of a transaction into the database and then start read transaction.
inline void mdbx::txn_managed::commit_embark_read (
finalization_latency & latency
)
function commit_embark_read_get_latency
Commits all the operations of a transaction into the database and then start read transaction.
inline finalization_latency mdbx::txn_managed::commit_embark_read_get_latency ()
Returns:
latency information of commit stages.
function commit_get_latency
Commits all changes of the transaction into a database and return latency information.
inline finalization_latency mdbx::txn_managed::commit_get_latency ()
Returns:
latency information of commit stages.
function operator=
txn_managed & mdbx::txn_managed::operator= (
txn_managed && other
) noexcept
function operator=
txn_managed & mdbx::txn_managed::operator= (
const txn_managed &
) = delete
function txn_managed [2/4]
constexpr mdbx::txn_managed::txn_managed () noexcept
function txn_managed [3/4]
mdbx::txn_managed::txn_managed (
txn_managed &&
) = default
function txn_managed [4/4]
mdbx::txn_managed::txn_managed (
const txn_managed &
) = delete
function ~txn_managed
mdbx::txn_managed::~txn_managed ()
The documentation for this class was generated from the following file docs/mdbx.h++