Operator overloading or alternatives to expression templates
Martin Nowak via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 13 06:31:35 PDT 2015
On 09/13/2015 11:00 AM, Sönke Ludwig wrote:
> I had played around with some ideas for a similar project, but didn't
> find a really satisfying solution:
> https://github.com/rejectedsoftware/dotter/blob/11ec72325e76c3329a58545526940c1df5328a2d/source/dotter/orm.d#L320
Yeah, that doesn't look too nice.
I think db.get!Author.where!(a => a.books.count > 10) is very powerful
b/c you can easily use relations for querying.
struct Author
{
@hasMany // relation in SQL or nested in MongoDB
Book[] books;
}
More information about the Digitalmars-d
mailing list