eventsourcing_sqlite

Types

pub opaque type SqliteStore(entity, command, event, error)

Functions

pub fn create_event_table(
  sqlite_store: SqliteStore(a, b, c, d),
) -> Result(List(Dynamic), Error)
pub fn load_aggregate_entity(
  sqlite_store: SqliteStore(a, b, c, d),
  aggregate_id: String,
) -> a
pub fn load_events(
  sqlite_store: SqliteStore(a, b, c, d),
  aggregate_id: String,
) -> Result(List(EventEnvelop(c)), Error)
pub fn new(
  sqlight_connection sqlight_connection: Connection,
  empty_entity empty_entity: a,
  handle_command_function handle: fn(a, b) -> Result(List(c), d),
  apply_function apply: fn(a, c) -> a,
  event_encoder event_encoder: fn(c) -> String,
  event_decoder event_decoder: fn(String) ->
    Result(c, List(DecodeError)),
  event_type event_type: String,
  event_version event_version: String,
  aggregate_type aggregate_type: String,
) -> EventStore(SqliteStore(a, b, c, d), a, b, c, d)
Search Document