Re: Discussion on groupBy

2015-01-11 Thread Peter Alexander via Digitalmars-d
On Saturday, 10 January 2015 at 20:19:14 UTC, Andrei Alexandrescu wrote: groupBy is an important primitive for relational algebra queries on data. Soon to follow are operators such as aggregate() which is a sort of reduce() but operating on ranges of ranges. GroupBy is a very important

Discussion on groupBy

2015-01-10 Thread Andrei Alexandrescu via Digitalmars-d
groupBy is an important primitive for relational algebra queries on data. Soon to follow are operators such as aggregate() which is a sort of reduce() but operating on ranges of ranges. With those in tow, a query such as SELECT COUNT(*), SUM(x) FROM data GROUP BY userid can be expressed as:

Re: Discussion on groupBy

2015-01-10 Thread Laeeth Isharc via Digitalmars-d
On Saturday, 10 January 2015 at 20:19:14 UTC, Andrei Alexandrescu wrote: groupBy is an important primitive for relational algebra queries on data. Soon to follow are operators such as aggregate() which is a sort of reduce() but operating on ranges of ranges. With those in tow, a query such as

Re: Discussion on groupBy

2015-01-10 Thread Orvid King via Digitalmars-d
On Saturday, 10 January 2015 at 20:19:14 UTC, Andrei Alexandrescu wrote: groupBy is an important primitive for relational algebra queries on data. Soon to follow are operators such as aggregate() which is a sort of reduce() but operating on ranges of ranges. With those in tow, a query such as

Re: Discussion on groupBy

2015-01-10 Thread Laeeth Isharc via Digitalmars-d
It would be interesting if we could make it possible to do a translation between D and SQL, similar to how LINQ is implemented internally, but preferably have it done at compile-time rather than at runtime. Have you seen Hibernated? https://github.com/buggins/hibernated