Hacker News new | ask | show | jobs
by kristov 1369 days ago
I think it would be neat if columns of a resultset could contain other resultsets (relvars?) as values. This would be the natural outcome of a join operation, and give greater flexibility on how you want to reduce those sub-relvars down. It also makes recursive queries more natural, yielding a "tree" of results. You could even build a reducer for a recursive query that concatenated rows to a string to serialize into whatever: json, XML, etc.
1 comments

This is essentially how EdgeDB’s “EdgeQL” language [0] works. Pretty much everything it deals with is a set. It maps much nicer onto many types of application code.

[0] https://www.edgedb.com/