Closed mrzasa closed 3 years ago
Hey @mrzasa 👋🏻
Thank you for your attention and the PR :)
Firstly, CI is red, please, take a look. Secondly,
I've added a Changelog entryDo we need that for a bugfix?
I think we do, just mention there you've fixed the issue.
Apart from that, looks good :)
NPlusOneControl.ignore that is documented but not used.
🙀
Could we use an array for ignore instead of a single regex?
Sounds good to me 👍
What do you think about removing the global state (direct calls to NPlusOneControl constant) from the Executor and inject the config in the constructor?
I would prefer to have both: global default and optional constructor parameter (similarly to default_matching
).
(I may provide them as follow-up PRs)
Just noticed that 🤦🏻♂️ Then, please, clean up outputs and I'll be ready to merge this
Done, please merge
What is the purpose of this pull request?
There is a setting
NPlusOneControl.ignore
that is documented but not used.What changes did you make? (overview)
I added a guard clause to
Executor::Collector
that skips queries matching the ignore patternIs there anything you'd like reviewers to focus on?
Two questions for potential future improvements (I may provide them as follow-up PRs)
DBQueryMatchers
so it'd be easier to keep those two configs in sync (or to migrate).NPlusOneControl
constant) from theExecutor
and inject the config in the constructor? It may make testing easier and save us from concurrency issues.Checklist