On Thursday, July 17, 2014 6:51:37 AM UTC-7, 
[email protected] wrote:
>
> Hi, I started migrating the OpenEdge adapter to a separate plugin and I 
> have a couple of questions. 
>
> From a plugin I can register the JDBC subadapter by modifying 
> `Sequel::JDBC::DATABASE_SETUP`, but how could I go about registering the 
> shared adapter for ODBC (there's a case statement and init code in 
> Sequel::ODBC::Database#adapter_initialize)? 
>

If you are on ruby 2.0+, then overriding the method via Module#prepend is 
the way to go.

Note that I plan on making changes soon that will allow subadapters to be 
picked up automatically even if external, similar to how regular adapters 
are picked up.  This should make things easier on you and other external 
adapter writers.
 

> One another thing I mentioned in the original PR is also that the JDBC 
> subadapter type is :datadirect here as that's the first part of the 
> connection URI, but datadirect itself has other possible sub-types (e.g. 
> jdbc:datadirect:openedge:..., jdbc:datadirect:informix:..., etc.).  What 
> would be the best way to handle that?  Or do you think it shouldn't 
> matter? 
>

Sequel will just try to load the jdbc/datadirect subadapter in that case, 
and you'd be responsible for setting things up after that, probably by 
looking at the next protocol after jdbc:datadirect.

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