Skip to content

Commit 6cad893

Browse files
author
Jamil Maqdis Anton
committed
WIP
1 parent 031b860 commit 6cad893

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Read.fs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace SqlStreamStore.FSharp
22

3+
open System.Threading
34
open SqlStreamStore
45
open SqlStreamStore.Streams
56

@@ -13,4 +14,11 @@ module Read =
1314
match direction with
1415
| Forward -> conn.ReadStreamForwards(stream.streamName, stream.position, msgCount)
1516
| Backward -> conn.ReadStreamBackwards(stream.streamName, stream.position, msgCount)
16-
|> Async.AwaitTask
17+
|> Async.AwaitTask
18+
19+
let readFromStreamAsync': IStreamStore -> ReadingDirection -> StreamDetails -> int -> CancellationToken -> Async<ReadStreamPage> =
20+
fun conn direction stream msgCount cancellationToken ->
21+
match direction with
22+
| Forward -> conn.ReadStreamForwards(stream.streamName, stream.position, msgCount, cancellationToken)
23+
| Backward -> conn.ReadStreamBackwards(stream.streamName, stream.position, msgCount, cancellationToken)
24+
|> Async.AwaitTask

0 commit comments

Comments
 (0)