mirror of
https://github.com/isar/libmdbx.git
synced 2025-03-10 19:18:14 +08:00
mdbx++: использование mdbx_txn_release_all_cursors_ex()
.
This commit is contained in:
parent
805d84480d
commit
8a1a62ce70
7
mdbx.h++
7
mdbx.h++
@ -5604,10 +5604,9 @@ inline cursor_managed txn::open_cursor(map_handle map) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline size_t txn::release_all_cursors(bool unbind) const {
|
inline size_t txn::release_all_cursors(bool unbind) const {
|
||||||
int err = ::mdbx_txn_release_all_cursors(handle_, unbind);
|
size_t count;
|
||||||
if (MDBX_UNLIKELY(err < 0))
|
error::success_or_throw(::mdbx_txn_release_all_cursors_ex(handle_, unbind, &count));
|
||||||
MDBX_CXX20_UNLIKELY error::throw_exception(err);
|
return count;
|
||||||
return size_t(err);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ::mdbx::map_handle txn::open_map(const ::mdbx::slice &name, const ::mdbx::key_mode key_mode,
|
inline ::mdbx::map_handle txn::open_map(const ::mdbx::slice &name, const ::mdbx::key_mode key_mode,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user