eventsourcing_sqlite

Types

pub type Metadata =
  List(#(String, String))

Values

pub fn create_event_table(
  sqlite_store: @internal SqliteStore(
    entity,
    command,
    event,
    error,
  ),
) -> Result(Nil, eventsourcing.EventSourcingError(a))
pub fn create_snapshot_table(
  sqlite_store: @internal SqliteStore(
    entity,
    command,
    event,
    error,
  ),
) -> Result(Nil, eventsourcing.EventSourcingError(error))
pub fn load_events(
  sqlite_store: @internal SqliteStore(
    entity,
    command,
    event,
    error,
  ),
  tx: sqlight.Connection,
  aggregate_id: String,
  start_from: Int,
) -> Result(
  List(eventsourcing.EventEnvelop(event)),
  eventsourcing.EventSourcingError(a),
)
pub fn new(
  sqlight_connection_string connection_string: String,
  event_encoder event_encoder: fn(event) -> String,
  event_decoder event_decoder: decode.Decoder(event),
  event_type event_type: String,
  event_version event_version: String,
  aggregate_type aggregate_type: String,
  entity_encoder entity_encoder: fn(entity) -> String,
  entity_decoder entity_decoder: decode.Decoder(entity),
) -> eventsourcing.EventStore(
  @internal SqliteStore(entity, command, event, error),
  entity,
  command,
  event,
  error,
  sqlight.Connection,
)
Search Document