datahike

https://datahike.io/, Join the conversation at https://discord.com/invite/kEBzMvb, history for this channel is available at https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/topic/datahike
Hugh Powell 2020-10-29T03:05:21.039600Z

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).

kkuehne 2020-10-29T08:36:32.039700Z

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!.

Hugh Powell 2020-10-29T22:15:13.040100Z

Awesome, thanks @konrad.kuehne 🙂

2020-10-29T22:41:12.040300Z

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.

whilo 2020-10-29T23:10:35.040600Z

We have not integrated 3df yet and I think the guys behind it (@niko963) are currently busy with other stuff.

2020-10-30T05:23:38.040800Z

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.