Skip to content

Fix support for subqueries using the query builder #2717

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Feb 1, 2024

Fix #2700

Checklist

  • Add tests and ensure they pass
  • Add an entry to the CHANGELOG.md file
  • Update documentation for new features

@GromNaN GromNaN requested a review from alcaeus February 1, 2024 12:39
Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

Just a wording suggestion that @jmikola may want to improve further.


User::where('results', 'elemMatch', ['gte' => 80, 'lt' => 85])->get();

A sub-query builder can be to apply filter on documents.
Copy link
Member

Choose a reason for hiding this comment

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

This reads a little rough. Consider:

Suggested change
A sub-query builder can be to apply filter on documents.
A closure can be used to create more complex sub-queries.

Ping @jmikola in case he has a better suggestion.

Copy link
Member Author

Choose a reason for hiding this comment

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

@jmikola any opinion on this wording?

Copy link
Member

Choose a reason for hiding this comment

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

No objections. Sorry for the delayed response, as I wasn't monitoring mentions in this repo.

@GromNaN GromNaN requested a review from jmikola February 2, 2024 17:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Call to undefined method MongoDB\Laravel\Query\Builder::compileWhereSub()
3 participants