mdbx++: добавление `mdbx::cursor::get_multiple_samelength()`.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2024-09-18 07:43:19 +03:00
parent 07309427fd
commit ec41ec1561
1 changed files with 21 additions and 0 deletions

View File

@ -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;