23 #include <rocksdb/db.h>
24 #include <rocksdb/slice_transform.h>
38 const char *Name()
const {
39 return "Path Slice Transform";
41 ::rocksdb::Slice Transform(const ::rocksdb::Slice &key)
const {
42 std::string key_str = key.ToString();
43 return ::rocksdb::Slice(key_str.substr(0, key_str.find(
'/')));
45 bool InDomain(const ::rocksdb::Slice &key)
const {
46 return key.ToString().find(
'/') != std::string::npos;
48 bool InRange(const ::rocksdb::Slice & )
const {
51 bool FullLengthEnabled(
size_t * )
const {
54 virtual bool SameResultWhenAppended(const ::rocksdb::Slice & )
const {