-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(parser): refactor array operator parsing
Refactor operator parsing logic into a separate function which is reused for arrays and normal key value parsing. This also allows multiple entries of operators in addition to `$in` and `$nin` operators inside arrays. The query `?count=>10&count<100` will evaluate to the following: ``` { "count": { "$gt": 10, "$lt": 100, } } ``` BREAKING CHANGE: the new parser will not discriminate agains having both `$in` and `$nin` values for the same key - which is redundant - but still a valid query. Close #20 Signed-off-by: Hans Kristian Flaatten <hans.kristian.flaatten@dnt.no>
- Loading branch information
Hans Kristian Flaatten
committed
Apr 7, 2016
1 parent
3e95baf
commit 3c8618d
Showing
3 changed files
with
276 additions
and
84 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
Oops, something went wrong.