Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 17, 2021. It is now read-only.

feat: CHARTS-2701 add support for $not with $regex #15

Merged
rueckstiess merged 1 commit into master from feat/charts-2701-support-not-regex
Aug 14, 2019

Conversation

@rueckstiess
Copy link
Contributor

@rueckstiess rueckstiess commented Aug 13, 2019

This is now supported as of MongoDB 4.0.7.
https://docs.mongodb.com/manual/reference/operator/query/not/index.html#not-and-regular-expressions

To support this change, we needed to add a special rule that allows $not to accept a ejson_regex right-hand side value.

To test, you can also visit https://pegjs.org/online and copy the ./src/grammar.pegjs content in the left-hand box, then write some queries in the right-hand side box, e.g.

{"foo": {"$not": {"$regex": "^Th", "$options": "g"}}}

I've also added tests for several cases with $regex.

Copy link
Contributor

@matt-d-rat matt-d-rat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@rueckstiess rueckstiess merged commit 0b8bf53 into master Aug 14, 2019
@rueckstiess rueckstiess deleted the feat/charts-2701-support-not-regex branch August 14, 2019 01:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@jarjee jarjee Awaiting requested review from jarjee

1 more reviewer

@matt-d-rat matt-d-rat matt-d-rat approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /