You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MONGOID-5029 #empty method should use an #exists? rather than a #count query (#5029)
* Fixes MONGOID-5029
- `#empty?` method should use an exists rather than a count query.
- `#empty?` and `#any?` should short-circuit avoid making a query if _added is set
- Make `#empty?` congruent with `#any?` code-wide
* #any? is exactly the inverse of #empty?
* Specs for empty?
* Add spec for any
* Fix all feedback from oleg
* adjust the tests since there are now fewer queries
Co-authored-by: shields <[email protected]>
Co-authored-by: Oleg Pudeyev <[email protected]>
0 commit comments