Closed frankitox closed 3 years ago
Ah! Just read about session serialization. I can extract all datoms with query-all
and add them to a new fresh session. Something like this:
(swap! *session
(fn [session]
(let [new-session (reduce o/add-rule (o/->session) rules)]
(o/fire-rules
(reduce o/insert new-session (o/query-all session))))))
Hi! Based on what I read on the README I started coding with this basic setup:
Now I'd like to modify
rules
from an editor and see the new rule behavior right away (after the file is saved). In the post save hook I tried re-adding all the rules with:But I get an exception telling that those rules already exist. So for now I just reset the whole session loosing the previous datoms. It's possible to remove all rules from the session? Or there's any other way to get the reloading behavior?