[database and libs] Re: Getting D ready for prime time
Adam D. Ruppe
destructionator at gmail.com
Wed Sep 29 09:18:41 PDT 2010
On Wed, Sep 29, 2010 at 03:56:10PM +0000, dsimcha wrote:
> d. Basic database support. I'd kill to have a D port/binding of SqlLite in
> Phobos, and SqlLite is public domain.
I have something, but I haven't touched it for a while now. Still compiles
though, at least on my box!
http://arsdnet.net/dcode/db.d
I've been just using my MySql binding <http://arsdnet.net/dcode/mysql.d> pretty
exclusively in recent months. I think it'd be pretty cool to eventually integrate
them into one interface. You can see a big difference between mysql and sqlite
in there right now though. My sqlite uses a (crappy, pre-phobos) Variant where
as the mysql just gives back strings.
I've been preferring the mysql method, with one exception: "" and NULL come out
the same way. But all in all, it is easy enough to just:
auto result = mysql.query("select id from table");
auto line = result.front;
auto a = to!int(line[0]);
In most cases anyway.
--------------------
As to the main question here, I think D is plenty ready right now. I've been
using it almost exclusively for all my projects for a couple years, and in the
last ~9 months, almost all work projects too. The interface with C makes things
really easy; writing my own D libraries is as simple as
extern(C){
// write the functions I need
}
// wrap them if the C API sucks
So the alleged lack of libraries is a minor inconvenience, at worst.
More information about the Digitalmars-d
mailing list