Skip to content

Insensitive/sensistive not working for string eq filter option? #215

Answered by edobrb
Atlinx asked this question in Q&A
Discussion options

You must be logged in to vote

That's because mode is used only in StringOperators
The type is defined as follow:

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 eq as well when mode field is present.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Atlinx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants