From: Phillip Gawlowski Date: 2008-04-17T01:40:57+09:00 Subject: Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christopher Dicely wrote: | While this may be true in some general sense, I don't think its really all that | relevant here. PostgreSQL's protocol is documented and supported over | TCP/IP, and Ruby certainly has TCP/IP support, so there is no reason you | couldn't write a pure Ruby PostgreSQL driver. Specifically speaking, it is not. |> Long story short: It's not impossible to define a standard API for Ruby, |> but somebody has to do it yet (don't look at me, C makes me scream). | | Ruby has a fairly standard DB API: Ruby-DBI. And there's no reason you | need to use C to write Ruby-DBI database drivers. Ruby::DBI used to use native adapter gems (at least for MySQL) and SQLite3, providing a rather thin wrapper around the functions provided by these native gems. "The Ruby DBI module includes the code that implements the general DBI layer, as well as a set of DBD-level drivers. Many of these drivers require that you have additional software installed. For example, the database driver for MySQL is written in Ruby and provides a binding to the Ruby MySQL module, which itself is written in C and provides a binding to the MySQL C client API. This means that if you want to write DBI scripts to access MySQL databases, you'll need to have both the Ruby MySQL module and the C API installed." ~From http://www.kitebird.com/articles/ruby-dbi.html#TOC_2 which is still referenced by Ruby::DBI. Also, last time I checked, Ruby-DBI wasn't part of the Ruby STDLIB, but is a third party tool, which doesn't make it Ruby's API, but a Ruby API to databases. Of course, ORMs solve different problems than the Ruby::DBI attempts to solve. - -- Phillip Gawlowski Twitter: twitter.com/cynicalryan You want to live forever? Don't die. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgGLBUACgkQbtAgaoJTgL8qcgCggDQt/VvAApMMrUDLsbivFSXh vqAAn3hs/WASPd6EXZxa3Es1YM0UipJV =UYdl -----END PGP SIGNATURE-----