This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-18
Channels
- # announcements (22)
- # asami (7)
- # babashka (43)
- # beginners (68)
- # biff (2)
- # calva (10)
- # clj-kondo (7)
- # cljdoc (29)
- # clojure (41)
- # clojure-austin (1)
- # clojure-brasil (2)
- # clojure-europe (25)
- # clojure-gamedev (3)
- # clojure-nl (2)
- # clojure-norway (9)
- # clojure-uk (31)
- # clojurescript (3)
- # community-development (7)
- # cursive (3)
- # data-science (4)
- # datomic (17)
- # emacs (30)
- # honeysql (10)
- # hyperfiddle (39)
- # introduce-yourself (1)
- # jobs-discuss (5)
- # kaocha (1)
- # lsp (11)
- # malli (12)
- # pathom (18)
- # pedestal (3)
- # proletarian (2)
- # quil (11)
- # rdf (46)
- # reitit (8)
- # releases (2)
- # shadow-cljs (34)
- # sql (3)
- # squint (10)
- # tools-deps (24)
- # xtdb (10)
Might be a long shot, but worth trying: I made a mistake and used inline parameters in my queries, now I'm realizing that using :params
is the way to go - did anyone run into this and wrote code to convert existing queries to parametrized ones? Probably doesn't even need rewrite-clj. Thanks!
Can you explain the "mistake" in a bit more detail?
When I hear "inline" and "mistake", I think of :inline
putting the values into the SQL string. But I don't think that's what you mean?
The only reason I can think of that you might prefer :params
over values in the DSL is for caching purposes (but I don't think many people use the caching system because of the restrictions it places on IN
and ARRAY
etc).
FWIW, I've never used named parameters with HoneySQL in my own code.
For one, I cannot use caches, other part is that after experimenting a bit I found it easier to compose queries from bigger re-usable bits when parameters were involved. The last bit is because I have to work with JSONB there's a lot of :inline
all over the place that I can avoid if I switch to named parameters
Hmm... :inline
? Why? Wouldn't you use :lift
to wrap JSON-like data inside the DSL?
I'm curious about the use case to see if I can make it easier...?