This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-28
Channels
- # aleph (10)
- # announcements (1)
- # aws-lambda (1)
- # beginners (162)
- # calva (81)
- # chlorine-clover (2)
- # cider (18)
- # clj-kondo (2)
- # cljs-dev (1)
- # cljsrn (12)
- # clojure (64)
- # clojure-australia (6)
- # clojure-europe (13)
- # clojure-nl (3)
- # clojure-sweden (26)
- # clojure-uk (36)
- # clojurescript (45)
- # community-development (10)
- # conjure (16)
- # core-logic (4)
- # cursive (6)
- # datascript (1)
- # emacs (1)
- # events (2)
- # fulcro (87)
- # girouette (5)
- # honeysql (4)
- # hoplon (3)
- # hugsql (3)
- # leiningen (8)
- # malli (18)
- # off-topic (33)
- # pathom (14)
- # reitit (5)
- # remote-jobs (1)
- # reveal (1)
- # shadow-cljs (50)
- # sql (3)
- # startup-in-a-month (1)
- # vim (5)
- # xtdb (30)
HugSQL makes it clean to get ad-hoc fields using SELECT
:
select :i*:cols from characters
where id in (:v*:ids)
But is there anything cleaner than this for ad-hoc UPDATE
?
https://www.hugsql.org/#using-expressions
That UPDATE
expression is very generic, supporting any specified table/etc. Seems like we are missing a level of abstraction here in between the two. I am looking for something more resembling the first statement if possible.The level of abstraction you’re looking for is already available in the underlying next.jdbc
or clojure.java.jdbc
libraries with the update!
function. So, while HugSQL lets you build any complex Clojure expression you want, you may find it easier to use the underlying library’s features.
Thanks, @curtis.summers, I will check that out!