Chronicle.EventSequences.TransactionalEventSequence (cratis_chronicle v0.2.0)

Copy Markdown View Source

Transactional view of an event sequence.

Appends are buffered in the current unit of work and are only sent to Chronicle when the unit of work is committed.

Summary

Functions

Buffers a single event append in the current unit of work.

Buffers multiple event appends in the current unit of work.

Creates a transactional event sequence wrapper.

Types

t()

@type t() :: %Chronicle.EventSequences.TransactionalEventSequence{
  event_sequence: Chronicle.EventSequences.EventSequence.t()
}

Functions

append(transactional_event_sequence, event_source_id, event, opts \\ [])

@spec append(t(), String.t(), struct(), keyword()) :: :ok

Buffers a single event append in the current unit of work.

append_many(transactional_event_sequence, event_source_id, events, opts \\ [])

@spec append_many(t(), String.t(), [struct()], keyword()) :: :ok

Buffers multiple event appends in the current unit of work.

new(event_sequence)

Creates a transactional event sequence wrapper.