honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
Asko Nõmm 2020-11-16T21:39:25.205Z

Hi! I’d like to know if it’s possible to make multiple where clauses with just format? Like so:

{:select [...]
 :from [:table]
 :where [[:= :a "b"]
         [:= :b "c"]]}
(the above example of course doesnt work)

seancorfield 2020-11-16T21:59:37.205500Z

You're missing :and at the beginning of the condition.

seancorfield 2020-11-16T21:59:54.205800Z

From the README:

=> '{:where [:and [:= :a #sql/param :baz] [:= :b #sql/inline 42]]
     :from (:foo)
     :select (#sql/call [:foo :bar] :foo.a #sql/raw "@var := foo.bar")}

Asko Nõmm 2020-11-16T22:01:35.205900Z

I completely missed it in the readme 😕 Apologies for that and thank you!

1