0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-18 07:50:57 +01:00

ircd::db: Add data() participant for rocksdb::Slice.

This commit is contained in:
Jason Volk 2018-01-17 20:28:34 -08:00
parent 87f0f3bc5a
commit 169f5aef84
2 changed files with 7 additions and 0 deletions

View file

@ -95,6 +95,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 &); size_t size(const rocksdb::Slice &);
const char *data(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

@ -4516,6 +4516,12 @@ ircd::db::val(const rocksdb::Iterator &it)
return slice(it.value()); return slice(it.value());
} }
const char *
ircd::db::data(const rocksdb::Slice &slice)
{
return slice.data();
}
size_t size_t
ircd::db::size(const rocksdb::Slice &slice) ircd::db::size(const rocksdb::Slice &slice)
{ {