File tree Expand file tree Collapse file tree 2 files changed +1
-46
lines changed Expand file tree Collapse file tree 2 files changed +1
-46
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module Append =
22
22
| AppendVersion.EmptyStream -> SqlStreamStore.Streams.ExpectedVersion.EmptyStream
23
23
| AppendVersion.NoStream -> SqlStreamStore.Streams.ExpectedVersion.NoStream
24
24
| AppendVersion.SpecificVersion version -> version
25
-
25
+
26
26
let appendNewMessage : SqlStreamStore.IStreamStore -> AppendStreamDetails -> MessageDetails -> Async < AppendResult > =
27
27
fun store streamDetails messageDetails ->
28
28
store.AppendToStream
@@ -40,19 +40,3 @@ module Append =
40
40
|> List.map newStreamMessageFromMessageDetails
41
41
|> List.toArray)
42
42
|> Async.AwaitTask
43
-
44
- module AppendExtras =
45
- let appendNewMessage : SqlStreamStore.IStreamStore -> AppendStreamDetails -> MessageDetails -> AsyncResult < AppendResult , AppendException > =
46
- fun store streamDetails messageDetails ->
47
- Append.appendNewMessage store streamDetails messageDetails
48
- |> Async.Catch
49
- |> Async.map ( function
50
- | Choice1Of2 response -> Ok response
51
- | Choice2Of2 exn ->
52
- Error
53
- <| match exn with
54
- // TODO: make sense
55
- | :? System.AggregateException as exn ->
56
- exn.InnerException
57
- |> AppendException.WrongExpectedVersion
58
- | exn -> exn |> AppendException.Other)
Original file line number Diff line number Diff line change @@ -52,32 +52,3 @@ module Read =
52
52
prefetchJson,
53
53
cancellationToken)
54
54
|> Async.AwaitTask
55
-
56
- module ReadExtras =
57
- let readAllStreamMessages : SqlStreamStore.IStreamStore -> ReadingDirection -> StartPositionInclusive -> MessageCount -> AsyncResult < List < StreamMessage >, string > =
58
- fun store readingDirection startPositionInclusive msgCount ->
59
- Read.readFromAllStreamAsync store readingDirection startPositionInclusive msgCount
60
- |> Async.bind ( fun readAllPage ->
61
- readAllPage.Messages
62
- |> Seq.toList
63
- |> fun messageList ->
64
- if messageList.Length = msgCount then
65
- Ok messageList
66
- else
67
- Error
68
- ( sprintf " Failed to retrieve all messages. Retrieved messages count: %d " messageList.Length)
69
- |> AsyncResult.fromResult)
70
-
71
- let readStreamMessages : SqlStreamStore.IStreamStore -> ReadingDirection -> ReadStreamDetails -> MessageCount -> AsyncResult < List < StreamMessage >, string > =
72
- fun store readingDirection readStreamDetails msgCount ->
73
- Read.readFromStreamAsync store readingDirection readStreamDetails msgCount
74
- |> Async.bind ( fun readStreamPage ->
75
- readStreamPage.Messages
76
- |> Seq.toList
77
- |> fun messageList ->
78
- if messageList.Length = msgCount then
79
- Ok messageList
80
- else
81
- Error
82
- ( sprintf " Failed to retrieve all messages. Retrieved messages count: %d " messageList.Length)
83
- |> AsyncResult.fromResult)
You can’t perform that action at this time.
0 commit comments