Paul Querna wrote:

An API to use as a starting point might be libdbi. Its public interface is at http://libdbi.sourceforge.net/docs/programmers-guide/

They also have a set of documentation on the design of the Database Driver's API at http://libdbi.sourceforge.net/docs/driver-guide/

I really like using libdbi, and I have used it for several apache modules, but its memory management is a painful hack where you are required to free() and malloc() things yourself. I would love a libdbi
like interface that fully embraced pools. Anyone else?

That would be useful. It seems like the core functionality should probably be stand alone, then you can build a thin apache module on top of it. Most of the functionality that's useful in an apache module (sql connection pooling, etc) can also be useful in other situations, so if we can pull that out and make it generic that should be a win.


In comparing Nick's API to libdbi's API the one thing that sticks out to me is that libdbi gives you a varargs interface, where Nick requires you to build up the string manually. I'd certainly prefer that kind of interface, just so we can reduce the chance for user error with regards to things like escaping strings and whatnot.

If we get to a working code-base, I would like to investigate adding it to APR-Util.

Seems reasonable to me, we already have a dbd abstraction in APR-Util, why not an sql abstraction as well?


-garrett

Reply via email to