mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-19 19:39:26 +08:00
mdbx: добавление mdbx_cursor_unbind()
в API.
This commit is contained in:
7
mdbx.h++
7
mdbx.h++
@@ -4223,6 +4223,9 @@ public:
|
||||
/// map handle.
|
||||
inline void bind(::mdbx::txn &txn, ::mdbx::map_handle map_handle);
|
||||
|
||||
/// \brief Unbind cursor from a transaction.
|
||||
inline void unbind();
|
||||
|
||||
/// \brief Returns the cursor's transaction.
|
||||
inline ::mdbx::txn txn() const;
|
||||
inline map_handle map() const;
|
||||
@@ -6110,6 +6113,10 @@ inline void cursor::bind(::mdbx::txn &txn, ::mdbx::map_handle map_handle) {
|
||||
error::success_or_throw(::mdbx_cursor_bind(txn, handle_, map_handle.dbi));
|
||||
}
|
||||
|
||||
inline void cursor::unbind() {
|
||||
error::success_or_throw(::mdbx_cursor_unbind(handle_));
|
||||
}
|
||||
|
||||
inline txn cursor::txn() const {
|
||||
MDBX_txn *txn = ::mdbx_cursor_txn(handle_);
|
||||
error::throw_on_nullptr(txn, MDBX_EINVAL);
|
||||
|
Reference in New Issue
Block a user