honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
nitaai 2019-09-23T14:00:49.002400Z

hi. i want to merge-join a raw subquery. what i do is (merge-join [(raw my-subquery) :foo] my-join-conditions). the format output however doesn’t insert the required parenthesis around the subquery in the join clause: INNER JOIN SELECT ... foo. i need INNER JOIN ( SELECT ... ) foo. how to do that?

nitaai 2019-09-23T14:14:10.002500Z

ok got it: (merge-join (sql/raw (str "(" my-subquery ") AS foo")) my-join-conditions)