mirror of
https://github.com/isar/libmdbx.git
synced 2025-04-01 02:32:57 +08:00
mdbx++: добавление mdbx::cursor::seek_multiple_samelength()
.
This commit is contained in:
parent
83e42d03bb
commit
2e6d9fd4d4
11
mdbx.h++
11
mdbx.h++
@ -4265,9 +4265,14 @@ public:
|
||||
|
||||
batch_samelength = MDBX_GET_MULTIPLE,
|
||||
batch_samelength_next = MDBX_NEXT_MULTIPLE,
|
||||
batch_samelength_previous = MDBX_PREV_MULTIPLE
|
||||
batch_samelength_previous = MDBX_PREV_MULTIPLE,
|
||||
seek_and_batch_samelength = MDBX_SEEK_AND_GET_MULTIPLE
|
||||
};
|
||||
|
||||
// TODO: добавить легковесный proxy-класс для замещения параметра throw_notfound более сложным набором опций,
|
||||
// в том числе с explicit-конструктором из bool, чтобы защититься от неявной конвертации ключей поиска
|
||||
// и других параметров в bool-throw_notfound.
|
||||
|
||||
struct move_result : public pair_result {
|
||||
inline move_result(const cursor &cursor, bool throw_notfound);
|
||||
move_result(cursor &cursor, move_operation operation, bool throw_notfound)
|
||||
@ -4465,8 +4470,8 @@ public:
|
||||
inline move_result lower_bound_multivalue(const slice &key, const slice &value, bool throw_notfound = false);
|
||||
inline move_result upper_bound_multivalue(const slice &key, 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 seek_multiple_samelength(const slice &key, bool throw_notfound = true) {
|
||||
return move(seek_and_batch_samelength, key, throw_notfound);
|
||||
}
|
||||
|
||||
inline move_result get_multiple_samelength(bool throw_notfound = false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user