On Wednesday, May 27, 2020 at 8:30:10 AM UTC-7, Tiago Cardoso wrote:
>
> I don't think it is. As per sequel/database/connecting.rb#self.connect :
>
> if conn_string is a string, then there is special handling logic there to
> load the jdbc adapter, and pass the remaining as uri string.
> if conn_string is a hash, adapter_class is called to infer the adapter.
> However, no options are passed downstream, so I can't tell which subadapter
> from jdbc I want to load.
>
> Most examples in the docs are from the first option, however I don't find
> any example on how to connect to a postgres database with an options hash.
> Ideally, I'd be able to do:
>
> Sequel.connect(adapter: "jdbc:postgresql")
> or
> Sequel.connect(adapter: "jdbc/postgresql")
> or
> Sequel.connect(adapter: "postgresql", adapter_options: {subdir: "jdbc"})
>
> none of these options work, however.
>
> sequel-activerecord_connection must only set the adapter option, as the AR
> contains contains the raw connection, hence why I can't define the full URI.
>
I guess the underlying issue is that sequel-activerecord_connection does
not handle JDBC connections properly. Considering that ActiveRecord
doesn't support JDBC at all (hence the need for JRuby to
maintain activerecord-jdbc-adapter themselves), I can see where supporting
that would be tricky.
In any case, I don't see how the problem is in Sequel. Sequel itself
doesn't have this problem. Maybe sequel-activerecord_connection needs
support added to it to load the correct JDBC subadapter?
If you still think that this is a problem in Sequel itself, please post a
self contained example showing the problem, using only Sequel.
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 view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/1188cc49-5089-43d2-bce2-c6166e23f538%40googlegroups.com.