apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garrett Rooney <roo...@electricjellyfish.net>
Subject Re: apr_dbd: a generic SQL wrapper
Date Thu, 09 Dec 2004 13:32:10 GMT
Garrett Rooney wrote:
> Nick Kew wrote:
> 
>> On Mon, 6 Dec 2004, Nick Kew wrote:
>>
>>
>>> Currently I have code for a proposed apr_dbd that compiles and loads
>>> cleanly, comprising apr_dbd.[c|h], a MySQL driver apr_dbd_mysql,
>>
>>
>>
>> I've now added a test program, and the drivers for MySQL and PostgreSQL
>> work for me.  Time to post here for preliminary review.
>>
>> I attach the current candidate APR software:
>>
>> apr_dbd.h    - specifies the API
>> apr_dbd.c    - implements (skeleton) framework
>> apr_dbd_mysql.c    - driver for MySQL
>> apr_dbd_pgsql.c - driver for PostgreSQL
>> apr_dbd_test.c    - test program
>>
>> There's a package containing this together with some related stuff
>> at http://www.apache.org/~niq/apache-dbd.tar.bz2
>>
>> If it is accepted as a startingpoint for an apr-util module, I'll
>> donate it to ASF and license it all under ASF terms.
>> If not, all rights reserved.

A few more questions...

MySQL's API requires you to call a function at startup in order to 
ensure thread safety.  Is there any provision for doing this in your design?

I wonder if it's possible to make pools and transactions work together. 
  Perhaps we could make it easy to set up a cleanup in a pool that would 
do the appropriate transaction handling.  Just a thought, I'm not sure 
how this would work exactly.

Oh, and I forgot the most important question...  How do you find the API 
in practice?  Is it easier than using the native APIs directly?  Harder? 
  Worth the pain?  How does it compare with other db abstraction layers?

-garrett

Mime
View raw message