honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
borkdude 2021-06-21T14:00:39.073300Z

How do I express x is not null in honeysql?

borkdude 2021-06-21T14:01:10.073500Z

[:raw "username is not null"]
:)

john-shaffer 2021-06-21T14:18:21.073900Z

[:not= nil :username]

seancorfield 2021-06-21T14:28:49.074300Z

dev=> (sql/format {:where [:is-not nil :x]})
["WHERE x IS NOT NULL"]
dev=> (sql/format {:where [:<> nil :x]})
["WHERE x IS NOT NULL"]
dev=> (sql/format {:where [:not= nil :x]})
["WHERE x IS NOT NULL"]

borkdude 2021-06-21T16:27:37.075300Z

the possibilities are endless!