www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - mysqlD

reply Steve Teale <steve.teale britseyeview.com> writes:
I recently resuscitated a piece of code that I'd originally got going under
Windows, but this time on Ubuntu with the latest MySQL client library.

It could be useful at two levels.

a) I went through the tedious process of translating mysql.h and its
dependencies to mysql.d - so it is possible to use the MySQL client API in D
programs.

b) What I actually wrote was a higher level thing that could presumably be
repeated for other database systems and ODBC

Apart from the basics like connecting, it provides:

execSQL()
execScalar()
execPrepared()
execReader()

and associated functions for setting up parameters, binding, etc, with quite
extensive unit testing of these facilities.

Would it be of any interest for the etc branch of Phobos?

Steve
Sep 30 2011
parent reply Adam Burton <adz21c gmail.com> writes:
Steve Teale wrote:

 I recently resuscitated a piece of code that I'd originally got going
 under Windows, but this time on Ubuntu with the latest MySQL client
 library.
 
 It could be useful at two levels.
 
 a) I went through the tedious process of translating mysql.h and its
 dependencies to mysql.d - so it is possible to use the MySQL client API in
 D programs.
 
 b) What I actually wrote was a higher level thing that could presumably be
 repeated for other database systems and ODBC
 
 Apart from the basics like connecting, it provides:
 
 execSQL()
 execScalar()
 execPrepared()
 execReader()
 
 and associated functions for setting up parameters, binding, etc, with
 quite extensive unit testing of these facilities.
 
 Would it be of any interest for the etc branch of Phobos?
 
 Steve
Even if it isn't I'd be quite interested in seeing the code. I was (with the intention of returning too) working on something similar (about halfway through) as a task for getting me writing some D code. I've got connecting, queries and was most of the way through getting some templates set up for convenient prepared statements, no unit tests etc though. Would be nice to see how someone else achieved the same task to see how else I could have developed the code.
Sep 30 2011
parent Steve Teale <steve.teale britseyeview.com> writes:
I'll put it on my web site tomorrow. It will be at
http://britseyeview.com/software/mysqld.tar.bz2.

Steve
Sep 30 2011