Hi Devs,
Would appreciate thoughts, discussion of the following issues.
At the moment the proposed uri for the dbi adapter for the SQLStore is:
“dbi-://username:pass@localhost:9876/dbname#other-stuff”
From this details about the backend are parsed and added to the @options hash.
We’d then have options
:adapter => :dbi
:dbd => :
For non-dbi adapter cases @options[:adapter] and @options[:dbd]
contain the same data.
Now for the SQLRelay dbd we still need to know the backend the relay
connects to, as well as that it is the sqlrelay dbd.
Some options:
A) have sqlrelay take the place of dbi in the uri, effectively meaning
that the dbi is only used for sqlrelay mediated connections. The case
for this is that there are already adapters, and for example
dbi-mysql doesn’t (immediately) add anything (in terms of
features/functionality). Case against is that this makes it difficult
to ever fully move all sql adapters to the DBI adapter. Assuming that
is every intended, here is where a roadmap would be handy.
B) extend the uri to: “dbi-sqlrelay-://etc.”. This would
introduce another configuration element: @options[:sqlrelay] =>
:. There would also need to be some logic specific to the
sqlrelay - but not too tricky. In this case @options[:sqlrelay] would
be nil unless @options[dbd] => :sqlrelay
Thoughts, comments?
I imagine B) would be the more popular/consensus choice?
Cheers
Mark