Monero
Loading...
Searching...
No Matches
lmdb::stream Namespace Reference

Functions

mdb_size_t count (MDB_cursor *cur)
std::pair< epee::span< const std::uint8_t >, epee::span< const std::uint8_t > > get (MDB_cursor &cur, MDB_cursor_op op, std::size_t key, std::size_t value)

Function Documentation

◆ count()

mdb_size_t lmdb::stream::count ( MDB_cursor * cur)

◆ get()

std::pair< epee::span< const std::uint8_t >, epee::span< const std::uint8_t > > lmdb::stream::get ( MDB_cursor & cur,
MDB_cursor_op op,
std::size_t key,
std::size_t value )

Calls mdb_cursor_get and does some error checking.

Parameters
curis given to mdb_cursor_get without modification.
opis passed to mdb_cursor_get without modification.
keyexpected key size or 0 to skip key size check.
valueexpected value size or 0 to skip value size check.
Exceptions
std::system_errorif key != 0 and key_.mv_size != key.
std::system_errorif value != 0 and value_.mv_size != value.
std::system_errorif mdb_cursor_get returns any error other than MDB_NOTFOUND.
Returns
{key bytes, value bytes} or two empty spans if MDB_NOTFOUND.