On Monday, January 6, 2020 at 7:43:16 AM UTC-8, BeeRich33 wrote:
>
> So that is always based on *:id*?
>
> Both look great, but the first I need to remember the select syntax with
> curly braces and inner array.
>
That's also a shortcut. Instead of:
select{[:country, count(:id)]}.
You could do:
select(:country, Sequel.function(:count, :id)).
See http://sequel.jeremyevans.net/rdoc/files/doc/virtual_rows_rdoc.html
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 view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/26e19cc6-bd27-4be9-ba20-8c1121027d0a%40googlegroups.com.