On Tuesday, September 10, 2013 11:46:37 AM UTC-7, Charles Monteiro wrote:
>
> Just wondering if there's a convenience api for getting the underlying 
> tables to a dataset i.e. instead of for example parsing the sql. 
>

Depends what exactly you want.  If you want just FROM tables, they are in:

  dataset.opts[:from]

If you also want to look at JOIN tables, they are stored in:

  dataset.opts[:join]

For simple datasets that just select from a single table, you can use:

  dataset.first_source

or:

  dataset.first_source_table

depending on the specifics of what you want.

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 http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to