diff options
Diffstat (limited to 'src/mongo/db/storage/key_string.h')
-rw-r--r-- | src/mongo/db/storage/key_string.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mongo/db/storage/key_string.h b/src/mongo/db/storage/key_string.h index 8582e9d2e30..a87eea8a6c1 100644 --- a/src/mongo/db/storage/key_string.h +++ b/src/mongo/db/storage/key_string.h @@ -48,6 +48,10 @@ namespace mongo { +namespace sbe::value { +class ValueBuilder; +} + namespace KeyString { enum class Version : uint8_t { V0 = 0, V1 = 1, kLatestVersion = V1 }; @@ -951,6 +955,18 @@ RecordId decodeRecordId(BufReader* reader); int compare(const char* leftBuf, const char* rightBuf, size_t leftSize, size_t rightSize); +/** + * Read one KeyString component from the given 'reader' and 'typeBits' inputs and stream it to the + * 'valueBuilder' object, which converts it to a "Slot-Based Execution" (SBE) representation. When + * no components remain in the KeyString, this function returns false and leaves 'valueBuilder' + * unmodified. + */ +bool readSBEValue(BufReader* reader, + TypeBits::Reader* typeBits, + bool inverted, + Version version, + sbe::value::ValueBuilder* valueBuilder); + template <class BufferT> template <class T> int BuilderBase<BufferT>::compare(const T& other) const { |