mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
ircd::db: Add size() participant for rocksdb::Slice.
This commit is contained in:
parent
625dc73978
commit
48c798de3f
2 changed files with 7 additions and 0 deletions
|
@ -94,6 +94,7 @@ namespace ircd::db
|
||||||
|
|
||||||
rocksdb::Slice slice(const string_view &);
|
rocksdb::Slice slice(const string_view &);
|
||||||
string_view slice(const rocksdb::Slice &);
|
string_view slice(const rocksdb::Slice &);
|
||||||
|
size_t size(const rocksdb::Slice &);
|
||||||
|
|
||||||
bool valid(const rocksdb::Iterator &);
|
bool valid(const rocksdb::Iterator &);
|
||||||
string_view key(const rocksdb::Iterator &);
|
string_view key(const rocksdb::Iterator &);
|
||||||
|
|
|
@ -4290,6 +4290,12 @@ ircd::db::val(const rocksdb::Iterator &it)
|
||||||
return slice(it.value());
|
return slice(it.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
ircd::db::size(const rocksdb::Slice &slice)
|
||||||
|
{
|
||||||
|
return slice.size();
|
||||||
|
}
|
||||||
|
|
||||||
rocksdb::Slice
|
rocksdb::Slice
|
||||||
ircd::db::slice(const string_view &sv)
|
ircd::db::slice(const string_view &sv)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue