This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-13
Channels
- # adventofcode (36)
- # aleph (1)
- # announcements (7)
- # aws (4)
- # babashka (14)
- # beginners (61)
- # calva (79)
- # cider (19)
- # clojure (48)
- # clojure-austin (1)
- # clojure-australia (2)
- # clojure-czech (2)
- # clojure-europe (46)
- # clojure-france (8)
- # clojure-nl (19)
- # clojure-uk (4)
- # clojuredesign-podcast (14)
- # core-logic (42)
- # data-science (3)
- # datalevin (8)
- # datomic (76)
- # events (1)
- # figwheel-main (9)
- # fulcro (6)
- # helix (1)
- # holy-lambda (1)
- # honeysql (2)
- # jobs (2)
- # jobs-discuss (20)
- # leiningen (5)
- # lsp (87)
- # minecraft (11)
- # nextjournal (4)
- # off-topic (17)
- # practicalli (1)
- # reagent (22)
- # reitit (8)
- # releases (3)
- # rum (2)
- # shadow-cljs (18)
- # sql (11)
- # tools-build (5)
- # tools-deps (9)
- # xtdb (20)
Hi. Are custom query functions supported? I'm using the datalevin babashka pod and get the following error when trying to use a custom query function: Unknown function 'my-fn in [(my-fn) ?greeting]
(defn my-fn
[]
"hello")
(d/q '[:find ?greeting
:in $
:where
[(my-fn) ?greeting]]
(d/db conn))
Query function is supported in Datalevin if you use from Clojure. But if you are using babashka, you will need to make sure your function is available for Datalevin’s sci (https://github.com/babashka/sci)
i have not tried this use case, so if you want to do some investigation and figure out what’s missing, that would be great
datalevin uses its own copy of sci, so it does not know about your function that’s defined in babashka’s sci
if you don’t have time to investigate, file an issue, i will see if I can get around to take a look
Thanks. I'll do some investigation later on and file an issue if I'm not able to figure it out
@U0A74MRCJ I did some investigation but unfortunately I was defeated. I think I'd need to learn more about how babashka pods work and clojure in general to know the correct approach to take here. I resorted to creating an issue https://github.com/juji-io/datalevin/issues/85 I'm happy to help with testing if you do get round to looking into this. In the meantime, I'm tempted to switch my project over to using clojure instead of babashka.