On Fri, 2016-01-01 at 10:00 +0000, Kapps via Digitalmars-d wrote:
> On Thursday, 31 December 2015 at 17:14:55 UTC, Piotrek wrote:
> > 
> >   struct Person
> >   {
> >    string name;
> >    string surname;
> >    ubyte age;
> >    Address address;
> >   }
> > 
> >  DataBase db = new DataBase("file.db");
> >  auto coll = db.collection!Person("NSA.Registry");
> >  auto visitationList = coll.filter!(p => p.name == "James");
> >  writeln (visitationList);
> 
> This example shows the difficulty of doing this in D. You can't 
> really have something like `p.Name == "James"`, or `p.Age < 21` 
> translate to SQL properly without language changes, which I 
> believe Walter or Andrei were against. This has been the key 
> problem when things like Linq to Sql for D have been brought up 
> before.

Why does it need language changes?

Having the ability to have an internal DSL instead of SQL string
fiddling is one of the major wins for SQLAlchemy. If it can be done in
Python why can't it be done in D?

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to