RDBI / rdbi-driver-odbc

ODBC driver for RDBI
MIT License
1 stars 11 forks source link

Support for DSN-less configurations #4

Closed blocktator closed 6 years ago

blocktator commented 11 years ago

Shane (@semmons99),

I am in the process of migrating some client code from using the dbi / dbd-odbc gems to the rdbi / rdbi-driver-odbc gem. I am dependent on the ability of using DSN-less configurations for my client's work. The former dbd-odbc gem supported configurations that don't use DSNs.

This pull request allows for the ability to create a connection by proxying to the ODBC::Driver to specify a new driver on the fly.

I decided to use the current mechanism of a hash to pass the attributes through. If you specify :dynamic as a key in the attributes hash, it was flip over to the DSN-less configuration. If you can think of a better way to support this API, I'm open to other possibilities too.

For reference, see the ruby-odbc documents on ODBC::Driver: http://www.ch-werner.de/rubyodbc/odbc.html#ODBC::Driver

Thanks for your understanding. Let me know if you have any questions.

semmons99 commented 11 years ago

@jamin4jc: Bummer, looks like I don't have permission to merge this. I personally have switch to the Sequel gem because most of the project maintainers have scattered to the wind on this project. Sequel is much more active and maintained very well.