aarondb/transactor/domain
Types
pub type Outcome {
Outcome(state: state.DbState, datoms: List(fact.Datom))
}
Constructors
-
Outcome(state: state.DbState, datoms: List(fact.Datom))
pub type Transaction {
Transaction(
facts: List(#(fact.Eid, String, fact.Value)),
valid_time: option.Option(Int),
operation: fact.Operation,
)
}
Constructors
-
Transaction( facts: List(#(fact.Eid, String, fact.Value)), valid_time: option.Option(Int), operation: fact.Operation, )
Values
pub fn apply(
database: state.DbState,
transaction: Transaction,
) -> Result(Outcome, String)
pub fn compute_next_state(
database: state.DbState,
facts: List(#(fact.Eid, String, fact.Value)),
valid_time: option.Option(Int),
operation: fact.Operation,
) -> Result(#(state.DbState, List(fact.Datom)), String)