-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Prevent array selector without operator before
This query is a valid mango query : ``` where({ worker: ['client', 'konnector']}) ``` But the library [sift](https://github.com/crcn/sift.js) that we use to replay the query with the same doctype can't apply that selector because it requires MongoDB operators. As a result, we have issues when some query where emptied and were breaking some feature That is why we throw an error. I've chosen to have a deep check to avoid too many calculations at runtime. BREAKING CHANGE: You must use a MongoDB operator like $in or $or operator instead, preferably in a partial index, to avoid costly full-scan. Co-authored-by: Quentin Valmori <quentin.valmori@gmail.com>
- Loading branch information
Showing
4 changed files
with
47 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters