On 4/22/05, Geo Carncross <[EMAIL PROTECTED]> wrote:
> 
> I'm thinking about allowing database drivers to abstract away any
> function in db.c (or anything else that "generates" SQL).
> 
> It was brought up before for some postgresql-specific things or mysql-
> specific things, but it seems to me that it could be used for a SQL-free
> database interface like metakit [or something more nefarious]
> 
> Any thoughts on those abstractions? My "easy" methods all involve
> mucking about with ELF-specific nonsense or the dynamic linker...

Wouldn't it be possible to *abuse* gettext for this kind of thing.
Mind you, it would only buy one the ability to have different SQL
queries for different drivers, and not something fancy like different
C-functions for different drivers. The old case (before DBMail 2.0)
had two big (about 2500 lines per file) for doing database
interactions with MySQL and PostgreSQL. The situation is quite a lot
better now, IMHO. But, if we want to make writing queries for
databases easier, it might be nice to write the best query for an
RDBMS, put it in a text file (with gettext, a .po file) and get
queries from there.

Ilja

Reply via email to