4 ms·
The property of composable queries is not unique to (or dare I say even characteristic of) ORMs, which are primarily concerned with mapping between tables or re
by ryandv 3y ago
The property of composable queries is not unique to (or dare I say even characteristic of) ORMs, which are primarily concerned with mapping between tables or relations (in the relational algebra sense), and in-memory objects.
It's the modelling of SQL as an AST that gives you that composability, and this does not require an ORM; see for instance arel (even though this was later absorbed into Rails' ActiveRecord ORM as an implementation detail...). [0]
[0] https://github.com/brynary/arel https://github.com/brynary/arel