This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-01
Channels
- # announcements (11)
- # babashka (21)
- # beginners (57)
- # biff (5)
- # calva (75)
- # clj-commons (20)
- # cljs-dev (27)
- # clojars (88)
- # clojure (18)
- # clojure-europe (11)
- # clojure-germany (1)
- # clojurescript (52)
- # datalevin (25)
- # emacs (2)
- # graphql (2)
- # gratitude (4)
- # off-topic (6)
- # pathom (16)
- # reagent (3)
- # releases (4)
- # shadow-cljs (7)
- # spacemacs (9)
- # transit (3)
- # xtdb (5)
I'm dealing with a recursive query that is stackoverflowing - is there a way to set a recursion depth limit?
Hey @U0HJD63RN I don't think we've been asked about this before(!) I don't believe we have any mechanism for controlling this currently :thinking_face: Is this recursion due to a single rule? Or mutually recursive rules?
I have just created an issue to discuss the requirement in more depth, feel free to chime in there as well / instead https://github.com/xtdb/xtdb/issues/1930
Thanks @U899JBRPF this recursion was a single rule "find me the children of this node" it turns out that I had bad data that had parent pointing to child in this case
I'm not experienced in recursive queries but could you for instance accumulate IDs when you walk through the graph? Then you would use this visited set to find loops in your data. You could have this loop finding query separately then. i.e. DFS but you'd accumulate into a set and then either crash or return it as a result.