Skip to content

Commit 09cfd7f

Browse files
author
Jamil Maqdis Anton
committed
Add docs. Change exception type.
1 parent 47d117f commit 09cfd7f

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

src/Read.fs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace SqlStreamStore.FSharp
33
open SqlStreamStore.Streams
44

55
module Read =
6-
/// Read forwards from the all stream.
6+
/// Read forwards from the all stream.
77
let allForwards (store: SqlStreamStore.IStreamStore)
88
(startPositionInclusive: StartPosition)
99
(msgCount: int)
@@ -37,20 +37,20 @@ module Read =
3737
ReadRaw.streamBackwards store streamName readVersion msgCount
3838
|> ExceptionsHandler.asyncExceptionHandler
3939

40-
/// Read forwards from the all stream, prefetching the messages' jsonData.
40+
/// Read forwards from the all stream, prefetching the messages' jsonData.
4141
let allForwardsPrefetch (store: SqlStreamStore.IStreamStore)
4242
(startPositionInclusive: StartPosition)
4343
(msgCount: int)
4444
: Async<Result<ReadAllPage, exn>> =
45-
ReadRaw.allForwardsPrefetch store startPositionInclusive msgCount true
45+
ReadRaw.allForwardsPrefetch store startPositionInclusive msgCount
4646
|> ExceptionsHandler.asyncExceptionHandler
4747

48-
/// Read backwards from the all stream, prefetching the messages' jsonData.
48+
/// Read backwards from the all stream, prefetching the messages' jsonData.
4949
let allBackwardsPrefetch (store: SqlStreamStore.IStreamStore)
5050
(startPositionInclusive: StartPosition)
5151
(msgCount: int)
5252
: Async<Result<ReadAllPage, exn>> =
53-
ReadRaw.allBackwardsPrefetch store startPositionInclusive msgCount true
53+
ReadRaw.allBackwardsPrefetch store startPositionInclusive msgCount
5454
|> ExceptionsHandler.asyncExceptionHandler
5555

5656
/// Read forwards from a specific stream, prefetching the messages' jsonData.
@@ -59,7 +59,7 @@ module Read =
5959
(readVersion: ReadVersion)
6060
(msgCount: int)
6161
: Async<Result<ReadStreamPage, exn>> =
62-
ReadRaw.streamForwardsPrefetch store streamName readVersion msgCount true
62+
ReadRaw.streamForwardsPrefetch store streamName readVersion msgCount
6363
|> ExceptionsHandler.asyncExceptionHandler
6464

6565
/// Read backwards from a specific stream, prefetching the messages' jsonData.
@@ -68,5 +68,5 @@ module Read =
6868
(readVersion: ReadVersion)
6969
(msgCount: int)
7070
: Async<Result<ReadStreamPage, exn>> =
71-
ReadRaw.streamBackwardsPrefetch store streamName readVersion msgCount true
71+
ReadRaw.streamBackwardsPrefetch store streamName readVersion msgCount
7272
|> ExceptionsHandler.asyncExceptionHandler

src/ReadRaw.fs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,10 @@ module ReadRaw =
7575
let allForwardsPrefetch (store: SqlStreamStore.IStreamStore)
7676
(startPositionInclusive: StartPosition)
7777
(msgCount: int)
78-
(prefetchJson: bool)
7978
: Async<ReadAllPage> =
8079
async {
8180
return! store.ReadAllForwards
82-
(fromStartPositionInclusiveForwards startPositionInclusive, msgCount, prefetchJson)
81+
(fromStartPositionInclusiveForwards startPositionInclusive, msgCount, true)
8382
|> Async.awaitTaskWithInnerException
8483
}
8584

@@ -88,11 +87,10 @@ module ReadRaw =
8887
let allBackwardsPrefetch (store: SqlStreamStore.IStreamStore)
8988
(startPositionInclusive: StartPosition)
9089
(msgCount: int)
91-
(prefetchJson: bool)
9290
: Async<ReadAllPage> =
9391
async {
9492
return! store.ReadAllBackwards
95-
(fromStartPositionInclusiveBackwards startPositionInclusive, msgCount, prefetchJson)
93+
(fromStartPositionInclusiveBackwards startPositionInclusive, msgCount, true)
9694
|> Async.awaitTaskWithInnerException
9795
}
9896

@@ -102,11 +100,10 @@ module ReadRaw =
102100
(streamName: string)
103101
(readVersion: ReadVersion)
104102
(msgCount: int)
105-
(prefetchJson: bool)
106103
: Async<ReadStreamPage> =
107104
async {
108105
return! store.ReadStreamForwards
109-
(StreamId(streamName), fromReadVersionForwards readVersion, msgCount, prefetchJson)
106+
(StreamId(streamName), fromReadVersionForwards readVersion, msgCount, true)
110107
|> Async.awaitTaskWithInnerException
111108
}
112109

@@ -116,11 +113,10 @@ module ReadRaw =
116113
(streamName: string)
117114
(readVersion: ReadVersion)
118115
(msgCount: int)
119-
(prefetchJson: bool)
120116
: Async<ReadStreamPage> =
121117
async {
122118
return! store.ReadStreamBackwards
123-
(StreamId(streamName), fromReadVersionBackwards readVersion, msgCount, prefetchJson)
119+
(StreamId(streamName), fromReadVersionBackwards readVersion, msgCount, true)
124120
|> Async.awaitTaskWithInnerException
125121
}
126122

0 commit comments

Comments
 (0)