re-db icon indicating copy to clipboard operation
re-db copied to clipboard

clj patterns

Open mhuebert opened this issue 3 years ago • 0 comments

This branch is for adding support for "patterns" in Clojure.

  • re-use the data structure as we use in cljs for recording pattern dependencies, eg {e {a {v <node>}}}
  • ability to run a query while also setting up dependencies on all the patterns that should invalidate it
  • registry: {...pattern #{queries}}
  • registry: {query #{listeners}}
  • invalidation: loop through a list of datoms (from tx-report) and find any queries that are invalid - recompute the result & send to all listeners
  • clean-up queries when last listener unlistens

TBD - figure out how similar things should work in Clojure vs ClojureScript (since Reagent doesn't work in Clojure but we probably want to keep using it in the client)

mhuebert avatar Mar 07 '22 17:03 mhuebert