From 0739a1e4454a7983b97f2019287fc1d8495f7e64 Mon Sep 17 00:00:00 2001 From: dvic Date: Tue, 21 Feb 2023 10:05:37 +0100 Subject: [PATCH] Pass opts in append_to_stream --- lib/commanded/event_store/adapters/event_store.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/commanded/event_store/adapters/event_store.ex b/lib/commanded/event_store/adapters/event_store.ex index 9940cc7..fe82481 100644 --- a/lib/commanded/event_store/adapters/event_store.ex +++ b/lib/commanded/event_store/adapters/event_store.ex @@ -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