@seancorfield The sql/find-by-keys and similar convenience functions have been great and covered 90% of use-cases in my (#polylith ⭐) repo; the one case where I've needed to reach for something else was when joining two tables- I was looking at the source of for-query (and associated fns), and feel like I could see a place where a join could be substituted in
The form-factor I have in mind would be that the table argument could also be a vector of table-names, or pairs of table-names and aliases (not a map because ordering), and the opts map could take a :join-type (one of :left, :right, :inner, :outer, etc.) and a :join-on option (vector of one or more pairs of columns to test for equality)
the :join-type is maybe short-sighted in that it forces the same join type on all tables
do you think this would be a violation of find-by-keys etc. simplicity, or would otherwise compromise next.jdbc's design?
I do note your comment here on the .sql namespace https://github.com/seancorfield/next-jdbc/issues/56#issuecomment-522361392, so perhaps this would fall into that DSL category
As the docs say: for more complex queries, use HoneySQL.
fair fair sir
JOIN in particular is complex -- see all the various join options in HoneySQL 🙂