Morning folks, is there an equivalent to PostgreSQL's triggers? E.g. I want to be notified whenever the database is updated (and possibly filter which sorts of updates I receive).
You could use datahike.core/listen!
with a callback which is triggered on each transaction. See this https://cljdoc.org/d/io.replikativ/datahike/0.3.2/api/datahike.core#listen!.
Awesome, thanks @konrad.kuehne 🙂
I don't know if https://github.com/sixthnormal/clj-3df ever ended up supporting datahike, but in theory, you could use a reactive query to trigger actions on very particular updates quite elegantly this way.
We have not integrated 3df yet and I think the guys behind it (@niko963) are currently busy with other stuff.
Yeah, I saw they haven't touched the project in almost a year now, which is unfortunate. But in theory, it shouldn't be a ton of work to adapt to what has already been done for Datomic, if this was really inspiring to someone.