Looks interesting!<p>When we switched to Clojure (from nodejs), we decided against any kind of ORM and use HugSQL which allows us to write "plain SQL" in .sql files while still using parameters.
Would be great if you can put in some examples where we can optimise parametric queries using this. One common instance is IN queries where if the number of params for IN clause is small, it might make sense to blow it up into multiple equals clauses, allowing better use of indexes. MySQL query optimiser is horrible with IN clauses and causes table-scans. I have seen table scans and skipping other indexes even when IN clause has zero cardinality (in which case its better to just remove it altogether).<p>Couldn't immediately think of other cases, but that one example sounds useful for this.
Very nice. I made something similar a while back:<p><a href="https://www.youtube.com/watch?v=CzwikfCAdws" rel="nofollow">https://www.youtube.com/watch?v=CzwikfCAdws</a>