@@ -45,15 +45,12 @@ module ReadRaw =
45
45
( startPositionInclusive : StartPosition )
46
46
( msgCount : int )
47
47
( prefetchJson : bool )
48
- ( cancellationToken : CancellationToken )
49
48
: Async < ReadAllPage > =
50
49
match readingDirection with
51
50
| ReadingDirection.Forward ->
52
- store.ReadAllForwards
53
- ( fromStartPositionInclusive startPositionInclusive, msgCount, prefetchJson, cancellationToken)
51
+ store.ReadAllForwards( fromStartPositionInclusive startPositionInclusive, msgCount, prefetchJson)
54
52
| ReadingDirection.Backward ->
55
- store.ReadAllBackwards
56
- ( fromStartPositionInclusive startPositionInclusive, msgCount, prefetchJson, cancellationToken)
53
+ store.ReadAllBackwards( fromStartPositionInclusive startPositionInclusive, msgCount, prefetchJson)
57
54
|> Async.AwaitTask
58
55
59
56
let readFromStream ' ( store : SqlStreamStore.IStreamStore )
@@ -62,9 +59,39 @@ module ReadRaw =
62
59
( readVersion : ReadVersion )
63
60
( msgCount : int )
64
61
( prefetchJson : bool )
65
- ( cancellationToken : CancellationToken )
66
62
: Async < ReadStreamPage > =
67
63
match readingDirection with
64
+ | ReadingDirection.Forward ->
65
+ store.ReadStreamForwards( StreamId( streamName), fromReadVersion readVersion, msgCount, prefetchJson)
66
+ | ReadingDirection.Backward ->
67
+ store.ReadStreamBackwards( StreamId( streamName), fromReadVersion readVersion, msgCount, prefetchJson)
68
+ |> Async.AwaitTask
69
+
70
+ let readFromAllStream '' ( store : SqlStreamStore.IStreamStore )
71
+ ( readingDirection : ReadingDirection )
72
+ ( startPositionInclusive : StartPosition )
73
+ ( msgCount : int )
74
+ ( prefetchJson : bool )
75
+ ( cancellationToken : CancellationToken )
76
+ : Async < ReadAllPage > =
77
+ match readingDirection with
78
+ | ReadingDirection.Forward ->
79
+ store.ReadAllForwards
80
+ ( fromStartPositionInclusive startPositionInclusive, msgCount, prefetchJson, cancellationToken)
81
+ | ReadingDirection.Backward ->
82
+ store.ReadAllBackwards
83
+ ( fromStartPositionInclusive startPositionInclusive, msgCount, prefetchJson, cancellationToken)
84
+ |> Async.AwaitTask
85
+
86
+ let readFromStream '' ( store : SqlStreamStore.IStreamStore )
87
+ ( readingDirection : ReadingDirection )
88
+ ( streamName : string )
89
+ ( readVersion : ReadVersion )
90
+ ( msgCount : int )
91
+ ( prefetchJson : bool )
92
+ ( cancellationToken : CancellationToken )
93
+ : Async < ReadStreamPage > =
94
+ match readingDirection with
68
95
| ReadingDirection.Forward ->
69
96
store.ReadStreamForwards
70
97
( StreamId( streamName), fromReadVersion readVersion, msgCount, prefetchJson, cancellationToken)
0 commit comments