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.

quarta-feira, 27 de Maio de 2020 às 15:06:40 UTC+1, Jeremy Evans escreveu:
>
> On Wednesday, May 27, 2020 at 3:23:58 AM UTC-7, Tiago Cardoso wrote:
>>
>> You're right. Actually, the problem seems to be the resulting query, 
>> specifically that the table is in caps:
>>
>> SELECT NULL AS "NIL" FROM "RECORDS" LIMIT 1
>>
>> The same query generated for CRuby/postgres is
>>
>> SELECT NULL AS "nil" FROM "records" LIMIT 1
>>
>> And the generation seems to be all done on sequel side. I've tracked this 
>> down to sequel/dataset/sql.rb, where SQL is effectively generated. When 
>> passed the source ":records", it goes down this list of methods:
>>
>>
>> source_list_append
>> literal_append
>> literal_symbol_append
>> quote_identifier_append
>> input_identifier
>>
>> This last one effectively upcases :records to "RECORDS" (the sql.rb 
>> method). I've seen that this is overriden in share/postgres, through 
>> inclusion of UnmodifiedIdentifiers module. However, this isn't happening 
>> right now, at least the way I'm defining it.
>>
>
> I'm not sure how this is happening, but my guess is it is related to 
> sequel-activerecord_connection.  If you can reproduce it with just Sequel, 
> I'll take a look.
>
> 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/05c6491c-e832-49d6-b783-f8c66b24b485%40googlegroups.com.

Reply via email to