Skip to content

Commit

Permalink
Pass opts in append_to_stream
Browse files Browse the repository at this point in the history
  • Loading branch information
dvic committed Feb 21, 2023
1 parent 2991340 commit 0739a1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/commanded/event_store/adapters/event_store.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ defmodule Commanded.EventStore.Adapters.EventStore do
end

@impl Commanded.EventStore.Adapter
def append_to_stream(adapter_meta, stream_uuid, expected_version, events) do
def append_to_stream(adapter_meta, stream_uuid, expected_version, events, opts \\ []) do
{event_store, name} = extract_adapter_meta(adapter_meta)

events = Enum.map(events, &Mapper.to_event_data/1)

event_store.append_to_stream(stream_uuid, expected_version, events, name: name)
opts = Keyword.put(opts, :name, name)
event_store.append_to_stream(stream_uuid, expected_version, events, opts)
end

@impl Commanded.EventStore.Adapter
Expand Down

0 comments on commit 0739a1e

Please sign in to comment.