diff options
Diffstat (limited to 'src/mongo/crypto/encryption_fields_util.h')
-rw-r--r-- | src/mongo/crypto/encryption_fields_util.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/mongo/crypto/encryption_fields_util.h b/src/mongo/crypto/encryption_fields_util.h index 7230d08fa48..d89a7009ca3 100644 --- a/src/mongo/crypto/encryption_fields_util.h +++ b/src/mongo/crypto/encryption_fields_util.h @@ -79,7 +79,40 @@ inline bool isFLE2EqualityIndexedSupportedType(BSONType type) { // Unindexed is the same as equality inline bool isFLE2UnindexedSupportedType(BSONType type) { - return isFLE2EqualityIndexedSupportedType(type); + switch (type) { + case BinData: + case Code: + case RegEx: + case String: + + case NumberInt: + case NumberLong: + case Bool: + case bsonTimestamp: + case Date: + case jstOID: + + case Array: + case Object: + case NumberDecimal: + case NumberDouble: + + // Deprecated + case Symbol: + case CodeWScope: + case DBRef: + return true; + + // Singletons + case EOO: + case jstNULL: + case MaxKey: + case MinKey: + case Undefined: + return false; + default: + MONGO_UNREACHABLE; + } } struct EncryptedFieldMatchResult { |