ooo, I love this. It reminds me of how nice C#'s LINQ is...
"Pipeline style" DB queries have some interesting advantages as well:
- It's straightforward to write efficient queries for DBs that don't include a query optimizer stares at Datomic
- You can split the pipeline into server-side and client-side steps when working with less capable DBs stares at most of NoSQL
- It would be much easier to transition from a pipeline API to a non-text-based API so that our ORMs/query builders can directly talk to DBs without the overhead of generating and parsing SQL.