SQL working [ was Re: The sorry state of the D stack? ]

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Sun Oct 7 14:56:45 PDT 2012


On Sun, 07 Oct 2012 18:54:17 +0200
Joseph Rushton Wakeling <joseph.wakeling at webdrake.net> wrote:

> On 10/07/2012 10:55 AM, Russel Winder wrote:
> > Why only PostgreSQL. Shouldn't it also work with MySQL, Oracle, DB2,
> > PervasiveSQL, SQLite3, etc.?
> 
> I don't have sufficient experience with SQL to be able to really make
> a judgement here, but is there a case for a std.sql or std.db that
> would provide a uniform D interface to the arbitrary DB of choice?
> 

Probably, yes. But someone needs to build such a lib first and then
propose it as a std.db candidate.

> Perhaps better as something in Deimos rather than Phobos, as I
> imagine it would bring in a bunch of external dependencies that the
> standard library shouldn't really have.

Not necessarily: Steve Teale's "mysqln" is a native D MySQL driver that
connects to the DB server directly and bypasses MySQL's official client
lib entirely. Teale has inexplicably disappeared off the face of the
internet, but Vibe.d has adapted the lib for use with Vibe.d, and
this guy has also made some updates:
https://github.com/simendsjo/mysqln/tree/misc-cleanups

I'm using that with Vibe.d and it seems to be working pretty well.

(I'm not sure if the simendsjo version or the Vibe.d version is more
up-to-date, though.)



More information about the Digitalmars-d mailing list