File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ namespace SqlStreamStore.FSharp
2+
3+ open SqlStreamStore
4+
5+ module AppendExtras =
6+ let appendNewMessage ( store : IStreamStore )
7+ ( streamName : StreamName )
8+ ( appendVersion : AppendVersion )
9+ ( messageDetails : MessageDetails )
10+ : Async < Result < Streams.AppendResult , string >> =
11+ Append.appendNewMessage store streamName appendVersion messageDetails
12+ |> Async.Catch
13+ |> Async.map ( function
14+ | Choice1Of2 response -> Ok response
15+ | Choice2Of2 exn -> Error exn.Message)
16+
17+ let appendNewMessages ( store : IStreamStore )
18+ ( streamName : StreamName )
19+ ( appendVersion : AppendVersion )
20+ ( messages : MessageDetails list )
21+ : Async < Result < Streams.AppendResult , string >> =
22+ Append.appendNewMessages store streamName appendVersion messages
23+ |> Async.Catch
24+ |> Async.map ( function
25+ | Choice1Of2 response -> Ok response
26+ | Choice2Of2 exn -> Error exn.Message)
You can’t perform that action at this time.
0 commit comments