This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-02
Channels
- # aleph (2)
- # announcements (3)
- # babashka (12)
- # beginners (55)
- # calva (11)
- # clj-http (12)
- # cljs-dev (41)
- # cljtogether (2)
- # clojure (51)
- # clojure-denmark (2)
- # clojure-europe (32)
- # clojure-nl (17)
- # clojure-norway (2)
- # clojure-switzerland (1)
- # clojure-uk (3)
- # clojurescript (34)
- # cursive (20)
- # data-science (3)
- # datahike (23)
- # datomic (3)
- # events (1)
- # fulcro (1)
- # honeysql (4)
- # inf-clojure (2)
- # interop (38)
- # java (3)
- # kaocha (8)
- # lsp (51)
- # luminus (2)
- # malli (2)
- # nextjournal (5)
- # off-topic (21)
- # pedestal (2)
- # polylith (12)
- # re-frame (4)
- # reagent (8)
- # reitit (4)
- # releases (1)
- # ring (4)
- # shadow-cljs (179)
- # spacemacs (2)
- # specter (1)
- # xtdb (13)
Hi, I’m working on a project and have a bit of difficulty getting the desired output, here’s what I have:
(h/where :and
[:>= :total_units 1]
[:raw "week_beginning >= date '2019-01-01'"]
(when skus [:in :sku skus]) ;; Good
(when brands [:in :brand brands]) ;; Good
(when cat-ids [:regex_like :cat cat-ids]) ;; Bad
)
regexp_like(cat-ids, '^Thing\|Foo\\|Bar')
<--- this is what I’m trying to replicate in Honey. I suspect I need to extend Honey but I’m failing all over the place, could anyone provide any pointers?skus, brands and cat-ids are all lists.
I ended up just using :raw
and built the string up.
@crankyadmin cat-ids
is a list of strings? You'd need str/join
to turn it into the single string argument that regexp_like
expects.