This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-14
Channels
- # babashka (43)
- # beginners (47)
- # biff (1)
- # calva (16)
- # cider (7)
- # clerk (6)
- # clj-kondo (39)
- # cljdoc (49)
- # clojure (29)
- # clojure-brasil (1)
- # clojure-europe (93)
- # clojure-losangeles (1)
- # clojure-norway (34)
- # conjure (7)
- # datalevin (8)
- # events (1)
- # gratitude (3)
- # honeysql (6)
- # hyperfiddle (2)
- # introduce-yourself (1)
- # javascript (1)
- # jobs-discuss (9)
- # lsp (3)
- # malli (10)
- # off-topic (8)
- # pedestal (3)
- # rewrite-clj (2)
- # shadow-cljs (17)
- # sql (33)
- # vim (1)
- # xtdb (31)
Hi! Is there a way to specify a create table foo (...) strict
(for https://www.sqlite.org/stricttables.html) with honeysql helpers ?
(sql/format {:create-table [:t
{:columns [:foo :bar :baz]}
[:strict]]})
=> ["CREATE TABLE t (foo, bar, baz) STRICT"]
The syntax that can be supported there is pretty random and it's database specific so it's not worth trying to design a helper for it. DDL in general is mostly too unstructured for helpers to improve things.
(sql/format (update table-ddl :create-table conj [:strict]))
🙂
👍 2