Hey Clojurians, I'm kinda confused about interpreting NOT IN
through honeySQL. Any pointers?
@chokheli Can you share what you've tried so far?
(! 776)-> clj -Sdeps '{:deps {honeysql {:mvn/version "RELEASE"}}}'
Clojure 1.10.1
user=> (require '[honeysql.core :as h] '[honeysql.helpers :refer :all])
WARNING: update already refers to: #'clojure.core/update in namespace: user, being replaced by: #'honeysql.helpers/update
nil
user=> (-> (select :*) (from :table) (where [:not-in :id [1 2 3 4]]) (h/format))
["SELECT * FROM table WHERE (id not in (?, ?, ?, ?))" 1 2 3 4]
user=>
Is that not what you're looking for?Damn, as always in Clojure it's the simplest solution which I just overlook. Thanks Sean!