This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-24
Channels
- # announcements (5)
- # aws (5)
- # aws-lambda (6)
- # babashka (6)
- # beginners (48)
- # calva (54)
- # clj-commons (12)
- # clj-kondo (39)
- # cljfx (3)
- # cljs-dev (11)
- # clojure (91)
- # clojure-europe (25)
- # clojure-uk (3)
- # clojurescript (16)
- # cursive (2)
- # data-oriented-programming (6)
- # datomic (8)
- # emacs (10)
- # events (3)
- # fulcro (2)
- # functionalprogramming (2)
- # graalvm (4)
- # graphql (2)
- # helix (1)
- # honeysql (4)
- # jobs (1)
- # malli (4)
- # nextjournal (21)
- # off-topic (5)
- # other-languages (4)
- # overtone (3)
- # reitit (17)
- # releases (2)
- # rewrite-clj (6)
- # ring (6)
- # shadow-cljs (37)
Hey we are using postgresql's https://www.postgresql.org/docs/14/ddl-inherit.html and I would like to extend honey to add the keywork ONLY
to make selects like SELECT * FROM ONLY table_name
What is the best approach? This is what I did;
(def format-selects-common #'sql/format-selects-common)
(defn- format-selects [k xs]
(format-selects-common
(sql/sql-kw k)
'from
xs))
(sql/register-clause! :from-only format-selects :where)
(sql/format {:select [:*], :from-only [[:table :t]]})
@rafaeldelboni Happy to add core support for that -- can you a) create an issue on GitHub with this example and b) include a link to the relevant PostgreSQL docs so I can read more about the syntax (and any subtleties of it). Thanks
Sure thing!
Just got the GH email -- thank you!