Skip to content

Commit 717a73e

Browse files
author
Jamil Maqdis Anton
committed
WIP
1 parent f93e4dd commit 717a73e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/Read.fs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ type ReadingDirection =
1010
| Backward
1111

1212
module Read =
13+
type private StartPositionInclusive = int64
14+
let readFromAllStreamAsync: IStreamStore -> ReadingDirection -> StartPositionInclusive -> int -> Async<ReadAllPage> =
15+
fun store readingDirection startPositionInclusive msgCount ->
16+
match readingDirection with
17+
| Forward -> store.ReadAllForwards(startPositionInclusive, msgCount)
18+
| Backward -> store.ReadAllBackwards(startPositionInclusive, msgCount)
19+
|> Async.AwaitTask
20+
1321
let readFromStreamAsync: IStreamStore -> ReadingDirection -> StreamDetails -> int -> Async<ReadStreamPage> =
1422
fun store readingDirection streamDetails msgCount ->
1523
match readingDirection with

src/Types.fs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ type StreamDetails =
1313
{ streamName: string
1414
version: Version }
1515

16-
type AllStreamDetails =
17-
{ streamName: string
18-
startPosition: int }
19-
2016
module Helpers =
2117
let toVersion: Version -> int =
2218
function

0 commit comments

Comments
 (0)