0
0
Fork 0
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:
Jason Volk 2018-01-17 20:15:13 -08:00
parent 625dc73978
commit 48c798de3f
2 changed files with 7 additions and 0 deletions

View file

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

View file

@ -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)
{ {