On Thursday, September 4, 2014 8:12:01 AM UTC-7, Chuck Gilbert wrote:
>
> Hello,
>
> I am creating a connection to Oracle using the jdbc adapter.  Using this 
> syntax:
>
> jdbc:oracle:thin:@//ddd1-scan:1526/INSTANCE.here.there.com
>
> I want the Sequel connection to go to a particular database, but cannot 
> get above url to make that happen.  I have added the database name per 
> driver syntax after the port, and at the very end of above url.  It will 
> not connect directly into my database with the changed syntax, and have to 
> use above format to make the connection happen in our environment.
> I tried these among a few others as well:
> jdbc:oracle:thin:@//ddd1-scan:1526:*alert*/INSTANCE.here.there.com
> jdbc:oracle:thin:@//ddd1-scan:1526/INSTANCE.here.there.com:*alert*
>
> So barring that, I was wondering when I create a dataset, if I can just 
> quailify the table names with the database name when I create a sequel 
> dataset.  For instance:
>
> AlertInfo = DB[:alert.aa_alert_info]
>
> "alert." would be the database qualifier to the "aa_alert_info" table.   
> If this would work I can then act upon that table.  However I get the error:
> "undefined method `aa_alert_info' for :alert:Symbol"
>

In Sequel, it's probably easiest to do:

  AlertInfo = DB[:alert__aa_alert_info]

You can also do:

  AlertInfo = DB[Sequel.qualify(:alert, :aa_alert_info)]

This is covered in the README 
(http://sequel.jeremyevans.net/rdoc/files/README_rdoc.html#label-Qualifying+identifiers+%28column%2Ftable+names%29)
 
as well as quite a few other places in the documentation. :)

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/d/optout.

Reply via email to