3 ms·
Lambda is necessary because when you do nested subqueries, saying r['x'] is ambiguous and can cause all sorts of unpleasantness. So, if you use nested queries,
by coffeemug 14y ago
Lambda is necessary because when you do nested subqueries, saying r['x'] is ambiguous and can cause all sorts of unpleasantness. So, if you use nested queries, the server rejects the implicit syntax and requires the use of lambda.
Lambda syntax is really nice too, I actually prefer it for writing queries.
- lucian1900 14y agoI find the lambda trick not explicit and obvious enough. I fear I would do something stupid like trigger a side-effect without realising. Again taking an example from SQLAlchemy, you can explicitly make a subquery, and then reference it instead of the original Table. A binding more like SQLAlchemy can probably written for RethinkDB.