D Database Connectivity

Sean Kelly sean at invisibleduck.org
Mon May 23 21:38:24 PDT 2011


On May 22, 2011, at 11:49 PM, Mandeep Singh Brar wrote:

> I have tried to port the jdbc drivers of postgres and sqlite along
> with libodbcxx to D2/phobos. The library ddbc, having an API similar
> to JDBC has been uploaded to dsource.org/projects/ddbc. Though
> everything from JDBC (blobs etc) may not be working (or atleast have
> not been tested), simple things like statements, callable statements
> and prepared statements seem to be working and have been put in a
> sample program on the home page.

Nice work!  I'd like to see the API become a bit more D-like though.  For example, with overloading and the index operator, prepared statement parameters could be set like:

   st[0] = "hello world"; 

Similar with ResultSet for indexing, along with possibly an alternate way to specify the desired type:

    rs[0].to!string();
    rs[0].asString;
    rs["stringType"].to!string();

For licensing, have you considered the Boost license?


More information about the Digitalmars-d-announce mailing list