8000 schema/query: allow multiple operators in objects by smyrman · Pull Request #11 · clarify/rested · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

schema/query: allow multiple operators in objects #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 23, 2022
Merged

schema/query: allow multiple operators in objects #11

merged 2 commits into from
Mar 23, 2022

Conversation

smyrman
Copy link
Contributor
@smyrman smyrman commented Mar 22, 2022

commit 347ac3a (HEAD -> multi-op, origin/multi-op)
Author: Sindre Myren sindre@clarify.io
Date: Tue Mar 22 12:14:41 2022 +0100

schema/query: allow multiple operators in objects

Examples:

- '{$gt:1,$lt:2}' is now an alias to '{$and:[{$gt:1},{$lt:2}]}'.
- '{$gt:1,$gt:2}' is now an alias to '{$and:[{$gt:1},{$gt:2}]}'.

Note that there is no guard against duplicated operators, just like
there is no guard for duplicated operators when using an explicit $and.
However, a mix of operator and non-operator fields will be rejected.

commit 138f227
Author: Sindre Myren sindre@clarify.io
Date: Tue Mar 22 10:24:52 2022 +0100

schema/query: fix linter issues

@smyrman smyrman requested a review from mmikalsen March 22, 2022 11:21
Examples:

- '{$gt:1,$lt:2}' is now an alias to '{$and:[{$gt:1},{$lt:2}]}'.
- '{$gt:1,$gt:2}' is now an alias to '{$and:[{$gt:1},{$gt:2}]}'.

Note that there is no guard against duplicated operators, just like
there is no guard for duplicated operators when using an explicit $and.
However, a mix of operator and non-operator fields will be rejected.
@smyrman smyrman marked this pull request as ready for review March 23, 2022 09:50
@smyrman smyrman merged commit b88196f into main Mar 23, 2022
@smyrman smyrman deleted the multi-op branch March 23, 2022 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0