yeah I had tried that but it won't work if I'm using raw sql ( makes sense)
e.g. DB['select * from my_table'], we are finishing a Oracle stored proc
converter i.e. auto converter (somewhat specific to our stored procs :) ) .
to enable that the decision was made that the sql strings would be kept
intact. There are some exceptions such as "select ..into" , point being I'm
dealing with raw sql

so I'll have to parse the sql which is fine, just checking if I had missed
something

thanks


On Tue, Sep 10, 2013 at 3:41 PM, Jeremy Evans <[email protected]>wrote:

> 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 a topic in the
> Google Groups "sequel-talk" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sequel-talk/geax8DY0-uI/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>



-- 
Charles A. Monteiro
www.monteirosfusion.com
sent from the road

-- 
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