0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd::db: Support passthru stub for comparator feature.

This commit is contained in:
Jason Volk 2018-10-31 11:23:55 -07:00
parent 895c52694e
commit 941b4ff8eb
2 changed files with 9 additions and 0 deletions

View file

@ -23,6 +23,7 @@ struct ircd::db::database::comparator final
database *d;
db::comparator user;
bool IsSameLengthImmediateSuccessor(const Slice &s, const Slice &t) const noexcept override;
void FindShortestSeparator(std::string *start, const Slice &limit) const noexcept override;
void FindShortSuccessor(std::string *key) const noexcept override;
int Compare(const Slice &a, const Slice &b) const noexcept override;

View file

@ -1321,6 +1321,14 @@ const noexcept
user.successor(*key);
}
bool
ircd::db::database::comparator::IsSameLengthImmediateSuccessor(const Slice &s,
const Slice &t)
const noexcept
{
return rocksdb::Comparator::IsSameLengthImmediateSuccessor(s, t);
}
///////////////////////////////////////////////////////////////////////////////
//
// database::prefix_transform