On Wed, Oct 13, 2021 at 1:49 AM David Espada <brome...@gmail.com> wrote:

> Hi.
>
> I need to define a synthtic field for a Sequel::Model source dataset. I'd
> like getting a sum field with any Model query. How can it be done?
>

It sounds like you want to add a SELECTed expression to the model's dataset:

class ModelName < Sequel::Model(DB[:table].select_append(some_expression))
end

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 sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/CADGZSSd4h1ULo3QuyfM7T3309tYnrOeX6hg1OGMvv6SvJhVDow%40mail.gmail.com.

Reply via email to