On Monday, October 15, 2018 at 11:39:26 AM UTC-7, M. Kaz wrote:

> Hello,
>
> I'm wondering if there is a way to view the names of all tables joined in 
> a dataset. For example, given a dataset `d` I want to do the following:
>
> if d.joined_dataset?
>    ## output an array of joined table names in d, e.g., [:people, 
> :employees]
>
> Does Sequel provide such a method?
>

There isn't a method for what you want, but you can get the information by 
introspecting the :from and :join dataset opts:

d.opts[:from] # array of FROM tables
d.opts[:join] # array of JOIN clauses

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.

Reply via email to