-
The filter below doesn't work for me: {
"filter": {
"username": { "eq": "atlinx", "mode": "INSENSITIVE"}
}
} It doesn't match a user that has the name |
Beta Was this translation helpful? Give feedback.
Answered by
edobrb
May 27, 2022
Replies: 1 comment
-
That's because export type StringOperators = {
contains?: string
startsWith?: string
endsWith?: string
mode?: 'sensitive' | 'insensitive'
} Under the (MongoDb driver) hood the operations contains, startsWith and endsWith use a $regex. The MongoDb $regex support that feature (case sensitive/insensitive) while $eq doesn't. We might use the $regex for |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Atlinx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's because
mode
is used only in StringOperatorsThe type is defined as follow:
Under the (MongoDb driver) hood the operations contains, startsWith and endsWith use a $regex. The MongoDb $regex support that feature (case sensitive/insensitive) while $eq doesn't. We might use the $regex for
eq
as well whenmode
field is present.