Skip to content

Commit 37c82be

Browse files
author
Jamil Maqdis Anton
committed
Add docs. Change exception type.
1 parent 3876f0f commit 37c82be

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

src/Append.fs

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

55
module Append =
6-
/// Appends a new message to a given stream.
6+
/// Appends a new message to a specific stream.
77
let appendNewMessage (store: SqlStreamStore.IStreamStore)
88
(streamName: string)
99
(appendVersion: AppendVersion)
@@ -12,7 +12,7 @@ module Append =
1212
AppendRaw.appendNewMessage store streamName appendVersion messageDetails
1313
|> ExceptionsHandler.asyncExceptionHandler
1414

15-
/// Appends a list of messages to a given stream.
15+
/// Appends a list of messages to a specific stream.
1616
let appendNewMessages (store: SqlStreamStore.IStreamStore)
1717
(streamName: string)
1818
(appendVersion: AppendVersion)

src/Read.fs

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

55
module Read =
6+
/// Read forwards from the all stream.
67
let allForwards (store: SqlStreamStore.IStreamStore)
78
(startPositionInclusive: StartPosition)
89
(msgCount: int)
9-
: Async<Result<ReadAllPage, string>> =
10+
: Async<Result<ReadAllPage, exn>> =
1011
ReadRaw.allForwards store startPositionInclusive msgCount
1112
|> ExceptionsHandler.asyncExceptionHandler
1213

14+
/// Read backwards from the all stream.
1315
let allBackwards (store: SqlStreamStore.IStreamStore)
1416
(startPositionInclusive: StartPosition)
1517
(msgCount: int)
16-
: Async<Result<ReadAllPage, string>> =
18+
: Async<Result<ReadAllPage, exn>> =
1719
ReadRaw.allBackwards store startPositionInclusive msgCount
1820
|> ExceptionsHandler.asyncExceptionHandler
1921

22+
/// Read forwards from a specific stream.
2023
let streamForwards (store: SqlStreamStore.IStreamStore)
2124
(streamName: string)
2225
(readVersion: ReadVersion)
2326
(msgCount: int)
24-
: Async<Result<ReadStreamPage, string>> =
27+
: Async<Result<ReadStreamPage, exn>> =
2528
ReadRaw.streamForwards store streamName readVersion msgCount
2629
|> ExceptionsHandler.asyncExceptionHandler
2730

31+
/// Read backwards from a specific stream.
2832
let streamBackwards (store: SqlStreamStore.IStreamStore)
2933
(streamName: string)
3034
(readVersion: ReadVersion)
3135
(msgCount: int)
32-
: Async<Result<ReadStreamPage, string>> =
36+
: Async<Result<ReadStreamPage, exn>> =
3337
ReadRaw.streamBackwards store streamName readVersion msgCount
3438
|> ExceptionsHandler.asyncExceptionHandler
3539

40+
/// Read forwards from the all stream, prefetching the messages' jsonData.
3641
let allForwardsPrefetch (store: SqlStreamStore.IStreamStore)
3742
(startPositionInclusive: StartPosition)
3843
(msgCount: int)
39-
: Async<Result<ReadAllPage, string>> =
44+
: Async<Result<ReadAllPage, exn>> =
4045
ReadRaw.allForwardsPrefetch store startPositionInclusive msgCount true
4146
|> ExceptionsHandler.asyncExceptionHandler
4247

48+
/// Read backwards from the all stream, prefetching the messages' jsonData.
4349
let allBackwardsPrefetch (store: SqlStreamStore.IStreamStore)
4450
(startPositionInclusive: StartPosition)
4551
(msgCount: int)
46-
: Async<Result<ReadAllPage, string>> =
52+
: Async<Result<ReadAllPage, exn>> =
4753
ReadRaw.allBackwardsPrefetch store startPositionInclusive msgCount true
4854
|> ExceptionsHandler.asyncExceptionHandler
4955

56+
/// Read forwards from a specific stream, prefetching the messages' jsonData.
5057
let streamForwardsPrefetch (store: SqlStreamStore.IStreamStore)
5158
(streamName: string)
5259
(readVersion: ReadVersion)
5360
(msgCount: int)
54-
: Async<Result<ReadStreamPage, string>> =
61+
: Async<Result<ReadStreamPage, exn>> =
5562
ReadRaw.streamForwardsPrefetch store streamName readVersion msgCount true
5663
|> ExceptionsHandler.asyncExceptionHandler
5764

65+
/// Read backwards from a specific stream, prefetching the messages' jsonData.
5866
let streamBackwardsPrefetch (store: SqlStreamStore.IStreamStore)
5967
(streamName: string)
6068
(readVersion: ReadVersion)
6169
(msgCount: int)
62-
: Async<Result<ReadStreamPage, string>> =
70+
: Async<Result<ReadStreamPage, exn>> =
6371
ReadRaw.streamBackwardsPrefetch store streamName readVersion msgCount true
6472
|> ExceptionsHandler.asyncExceptionHandler

0 commit comments

Comments
 (0)