From ec41ec1561e1afa0e3696925d14050ee30de5c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Wed, 18 Sep 2024 07:43:19 +0300 Subject: [PATCH] =?UTF-8?q?mdbx++:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20`mdbx::cursor::get=5Fmultiple=5Fsame?= =?UTF-8?q?length()`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mdbx.h++ | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/mdbx.h++ b/mdbx.h++ index 8ccbc9d4..98b878ff 100644 --- a/mdbx.h++ +++ b/mdbx.h++ @@ -4868,6 +4868,10 @@ public: pair_exact = pair_equal, pair_greater_or_equal = MDBX_TO_PAIR_GREATER_OR_EQUAL, pair_greater_than = MDBX_TO_PAIR_GREATER_THAN, + + batch_samelength = MDBX_GET_MULTIPLE, + batch_samelength_next = MDBX_NEXT_MULTIPLE, + batch_samelength_previous = MDBX_PREV_MULTIPLE }; struct move_result : public pair_result { @@ -5133,6 +5137,23 @@ public: const slice &value, bool throw_notfound = false); + inline move_result get_multiple_samelength(const slice &key, + bool throw_notfound = true) { + return move(batch_samelength, key, throw_notfound); + } + + inline move_result get_multiple_samelength(bool throw_notfound = false) { + return move(batch_samelength, throw_notfound); + } + + inline move_result next_multiple_samelength(bool throw_notfound = false) { + return move(batch_samelength_next, throw_notfound); + } + + inline move_result previous_multiple_samelength(bool throw_notfound = false) { + return move(batch_samelength_previous, throw_notfound); + } + inline bool eof() const; inline bool on_first() const; inline bool on_last() const;