On Sun, 02 Oct 2011 19:52:50 +0300, Steve Teale <steve.te...@britseyeview.com> wrote:

I've put some still very rough generated documentation on my web page

http://britseyeview.com/software/mysqld.html

There is probably some MySQL specific stuff still in there, but I think this is close to being an interface that could be implemented for other database C
api's, and for ODBC.

I'd appreciate some quick comments to find out if I am way off the mark, or if
it is worth pursuing.

1) There seems to be a lot of MySQL-specific stuff in Connection. I guess that when/if the time comes, it will be separated into an abstract class and a MySQL specialization. 2) Setting parameters seems kinda clumsy. It should be doable with one function call with variadic template parameters.
3) In my opinion, querying the database shouldn't involve heap allocations.

I have written an SQLite wrapper (around etc.c.sqlite) for basic functionality:
https://github.com/CyberShadow/ae/blob/master/sys/sqlite3.d

Perhaps you'll find it useful for some insight towards a common interface.

--
Best regards,
 Vladimir                            mailto:vladi...@thecybershadow.net

Reply via email to