On Wednesday, February 27, 2019 at 1:17:45 PM UTC-8, [email protected] wrote: > > Calling `empty?` on a Sequel::Dataset adds a `LIMIT 1` to the query, but > calling `any?` does not. > > Was explicitly adding this functionality merely overlooked or is there a > specific reason why `any?` does not get this special treatment? >
Here's a link to the previous discussion: https://groups.google.com/forum/#!msg/sequel-talk/XsrAyjkv7Ec/uOAxkes7DgAJ In short, it isn't difficult to add, but for backwards compatibility, you could only optimize it if no row_proc was used, and that would result in different behavior for datasets without row_procs and datasets with row_procs, which could lead to confusion. In general !empty? can be used instead of any?. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
