This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-19
Channels
- # babashka (2)
- # babashka-sci-dev (15)
- # beginners (44)
- # clara (6)
- # clj-kondo (5)
- # clojure (39)
- # clojure-europe (5)
- # clojurescript (14)
- # data-science (5)
- # datahike (6)
- # datalevin (7)
- # graalvm (2)
- # helix (3)
- # humbleui (8)
- # minecraft (1)
- # missionary (10)
- # nbb (8)
- # nrepl (2)
- # portal (11)
- # shadow-cljs (3)
- # tools-deps (6)
- # xtdb (10)
Hi all, just getting started with Clara and hit a point of confusion. I'd like to query records that fall within a given date range. I'm trying define a query with ?start
and ?end
parameters, but from what I've tried, mk-session
fails out saying that those variables are unbound. Any tips?
(defrecord Foo [date])
(defquery get-foos-in-date-range
[?start ?end]
[?foos <- (acc/all) :from [Foo (date-in-range? date ?start ?end)]])
(mk-session) ;; Exception: Unbound variables #{:?start :?end}
Ah, so this isn't possible with a query?
I'm guessing then I should just query all Foos and do a filter
outside the query?
That, or insert a fact that would represent the values needed, join it to the foos and insert only the matched foos as another fact
💯 1