On Saturday, July 6, 2019 at 12:22:52 AM UTC-7, Artem Kondratev wrote:
>
> You're right.
>
> How about implicit_subquery then?
>
> def self.dataset
>   ds = QUERY['SELECT * FROM bank_accounts where attr IS NULL']
>   ds = ds.extension(:implicit_subquery)
>   ds
> end
>
> The initial result looks like what it should be, but this seems to kill 
> off the whole purpose of classes and subclasses by returning a resulting 
> hash in the end...
>

You can try:

  set_dataset dataset.where(:attr=>nil).from_self(:alias=>:bank_accounts)

That may may inserting and updating difficult, though.

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/1dc3931c-68e6-479a-935c-cca880a08a2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to