[Nitro] [Og] RFC DBI and SQLRelay URI

Mark Van De Vyver mvyver at gmail.com
Thu Nov 8 00:42:55 EST 2007

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-<vendor>://username:pass at 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      => :<vendor>

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 <vendor> 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-<vendor>://etc.".  This would
introduce another configuration element: @options[:sqlrelay] =>
:<vendor>.  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?


More information about the Nitro-general mailing list