Fork me on GitHub

Is it possible to detect new db transactions? I woukd like to run rules automatically on top of new datahike transactions. Essentially create calculated fields in an automated way.

Björn Ebbinghaus08:03:34

There is datahike.api/listen But depending on what you want to do, I recommend wrapping transact! or looking into transaction functions


Right @U4VT24ZM3, it would also depend on how complex the calculations are and what kind of data you would need from the transaction.

Braden Shepherdson19:03:15

trying to use Datahike under Integrant is proving somewhat frustrating. it feels like at least some components haven't been set up to handle shutdown gracefully. I'm trying to (d/release conn) on halt, and then (d/connect cfg) on startup. I get eg.

Execution error (IllegalArgumentException) at datahike.transactor/eval62640$fn$G (transactor
No implementation of method: :shutdown of protocol: #'datahike.transactor/PTransactor found 
for class: datahike.transactor.LocalTransactor 

Braden Shepherdson19:03:31

which seems weird, because there's totally an implementation of shutdown right there.

Braden Shepherdson19:03:18

I think I'm having trouble with reloading these namespaces live, so there are actually different classes/interfaces with the same name floating around. let me check my Reloaded setup.


which backend are you using?

Braden Shepherdson20:03:32

I've so far sidestepped the problem by using more targeted reloads into the REPL, rather than full-scale :reload-all


ok, I used datahike with components and it worked...keep me posted if you have a problem regarding datahike.