thy1016/mooncmd/projection does not have a README file
pub(all) struct LiveProjection[AggregateId, E] {
view : Json
last_version : Int
projection : Projection[AggregateId, E]
event_store : EventStore[AggregateId, E]
aggregate_id : AggregateId
}fn[AggregateId, E] LiveProjection::new(aggregate_id : AggregateId, event_store : EventStore[AggregateId, E], projection : Projection[AggregateId, E], position : SubscriptionPosition) -> LiveProjection[AggregateId, E] raise EventStoreErrorfn[AggregateId, E] LiveProjection::refresh(self : LiveProjection[AggregateId, E]) -> Unit raise EventStoreErrorfn PersistedProjection::save(self : PersistedProjection, id : String, view : Json, version : Int) -> Unit raisepub(all) struct Projection[AggregateId, E] {
init : () -> Json
apply : (Json, EventMessage[AggregateId, E]) -> Json
apply_batch : (Json, Array[EventMessage[AggregateId, E]]) -> Json
}fn[AggregateId, E] Projection::new(init : () -> Json, apply : (Json, EventMessage[AggregateId, E]) -> Json, apply_batch : (Json, Array[EventMessage[AggregateId, E]]) -> Json) -> Projection[AggregateId, E]pub(all) enum SubscriptionPosition {
Origin
Current
FromVersion(Int)
}fn[AggregateId, E] default_batch(apply : (Json, EventMessage[AggregateId, E]) -> Json) -> ((Json, Array[EventMessage[AggregateId, E]]) -> Json)Install
Download zipCommand-side event sourcing kernel for MoonBit: pure command handlers, auto-wrapped EventMessage metadata (correlation/causation), optimistic concurrency with duplicate-version rejection, SQLite event store, projections and snapshots.