On Mon, 25 Apr 2011 02:33:44 +0300, Robert Clipsham <rob...@octarineparrot.com> wrote:

On 25/04/2011 00:19, Alex Khmara wrote:
Is it possible to see code somewhere?

https://github.com/mrmonday/serenity/blob/master/serenity/SqlQuery.d - The code isn't great, it's adapted from D1, and wasn't complete before the port.

It would be interesting to get rid of
raw SQL, but retain access to it's parts - but I'm not sure how many
constructs
you can handle in this way - for example, what about complex queries
with joins?
What about subqueries?

I've implemented this kind of thing before with another developer, and it's perfectly possible to deal with complex joins and subqueries (he implemented that previously). It isn't implemented in the code above however, I only did the basics to begin with, and I'm undecided whether I'm going to keep the former once the new interface is implemented, I haven't thought that far ahead.


Second variant is a kind of ORM, and I think it will be too highlevel for
many cases. But I understand that for web framework it's interesting
direction. As for standard D library, I would like to have something more
generic and traditional. Probably, something modeled from Perl's DBI, but
more D-like.

Reply via email to