Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Welcome to D DBI

Description

D DBI is a database independent interface for the D programming language.

License

D DBI is licensed under the BSD License.

Status

After D DBI was around for quite a while, work started in the summer of 2008 improve and update, especially at the lower levels to make the API nicer to use.

The number of available backends suffers due to this work, at least initially - as the functionality in the revised interfaces will be larger. Depending somewhat on contributions from others, the likely prioritization of backends will be Mysql, Sqlite and PostreSQL - beyond that contributions is a necessity. It is possible that such contributions can be in the form of drivers aka those found for JDBC, though - if plans for dynamic loading of functionality/plugins are properly implemented. Currently Mysql support is in, and Sqlite well on its way.

The first commits were made in the late autumn of 2008.

Update 24th of January, 2009: I have a fork of DDBI at github that has a new API. The Mysql implementation seems pretty stable in my tests. Sqlite has a lot of work on it but is not usable yet. Check it out at http://github.com/aaronc/ddbi/. Check out the API docs at http://aaronc.github.com/ddbi - Aaron Craelius

Lars Ivar Igesund, 25th of January, 2009

Supported Databases and Interfaces in earlier releases

Started

Old news

The current change log is available here.

Documentation

The documentation for the most recent version can be found here.

Another recommended way to learn how to use D DBI is to look at the unittests in the SqliteDatabase file.

For information on how to build D DBI into a library, see HowToBuild.

Authors

See the list here.

Sample Code

import dbi.sqlite.SqliteDatabase;
import dbi.Row;
import tango.io.Stdout;

void main() {
    SqliteDatabase db = new SqliteDatabase();
    db.connect("test.db");

    Row[] rows = db.queryFetchAll("SELECT * FROM names");
    foreach (Row row; rows) {
        Stdout("name:")(row["name"]).newline()("zip:")(row["zip"]).newline();
    }

    db.close();
}

Downloads

Version 0.2.5

Most Recent

SVN

Previous

Version 0.2.4

Project Information

NameDDBI
CategoryServer Resources
Status3 - Alpha
Short DescriptionA database independent interface.
Long Description
Home Pagehttp://www.dsource.org/projects/ddbi/
Forumhttp://www.dsource.org/forums/viewforum.php?f=60
Database Bindings (Wiki4D) http://www.prowiki.org/wiki4d/wiki.cgi?DatabaseBindings