This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-07
Channels
- # announcements (4)
- # babashka (59)
- # beginners (26)
- # calva (34)
- # clj-kondo (3)
- # cljs-dev (1)
- # clojure (77)
- # clojure-austin (4)
- # clojure-europe (20)
- # clojure-nl (2)
- # clojure-norway (11)
- # clojure-spec (3)
- # clojure-uk (4)
- # clojurescript (103)
- # community-development (2)
- # cursive (15)
- # datalevin (12)
- # datascript (38)
- # datomic (1)
- # deps-new (2)
- # events (3)
- # figwheel-main (6)
- # fulcro (9)
- # honeysql (12)
- # jobs (4)
- # juxt (18)
- # kaocha (19)
- # lsp (42)
- # missionary (2)
- # pathom (14)
- # polylith (6)
- # portal (6)
- # reagent (8)
- # reitit (4)
- # releases (2)
- # shadow-cljs (17)
- # testing (1)
- # tools-deps (50)
- # vim (46)
- # xtdb (12)
Is there a way to set the honeysql checking mode globally you can for the dialect and quoting options?
Not currently. Feel free to create a GH issue about it!
hello all, how do I convert this to helper?
{:with [[:ce {:insert-into ...}
to:
(sqlh/with
(sqlh/insert-into ...)) ?
Are you looking for this result?
user=> (-> (with [:ce (insert-into :table)]) (sql/format))
["WITH ce AS (INSERT INTO table)"]
user=>
I copied it from your code @U0YJJPFRA
{:with [[:ce {:insert-into ...}
The :with
clause takes a sequence of pairs as a value. The helper takes any number of pairs. That's typically how all helpers work.It's like this:
user=> (-> (select :a [:b :c] [[:+ :d :e] :f]) (from :table) (sql/format))
["SELECT a, b AS c, d + e AS f FROM table"]
user=>
Compare with the raw data structure:
user=> (-> (select :a [:b :c] [[:+ :d :e] :f]) (from :table))
{:select [:a [:b :c] [[:+ :d :e] :f]], :from [:table]}
user=>