aarondb/event
Values
pub fn on_event(
db: process.Subject(transactor.Message),
event_type: String,
callback: fn(state.DbState, fact.Eid) -> Nil,
) -> process.Subject(query_types.ReactiveDelta)
Convenience function to create an event listener. This subscribes to the database’s reactive system for assertions of the specified event type.
pub fn record(
db: process.Subject(transactor.Message),
event_type: String,
timestamp: Int,
payload: List(#(String, fact.Value)),
) -> Result(state.DbState, String)
Records a new event into the database. An event is modeled as an entity with a type, timestamp, and optional payload attributes.