Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Database.LSMTree.Internal.Cursor
Synopsis
- readEntriesWhile :: forall h m res. (MonadMask m, MonadST m, MonadSTM m) => ResolveSerialisedValue -> (SerialisedKey -> Bool) -> (SerialisedKey -> SerialisedValue -> Maybe (WeakBlobRef m h) -> res) -> Readers m h -> Int -> m (Vector res, HasMore)
Documentation
readEntriesWhile :: forall h m res. (MonadMask m, MonadST m, MonadSTM m) => ResolveSerialisedValue -> (SerialisedKey -> Bool) -> (SerialisedKey -> SerialisedValue -> Maybe (WeakBlobRef m h) -> res) -> Readers m h -> Int -> m (Vector res, HasMore) Source #
General notes on the code below:
* it is quite similar to the one in Internal.Merge, but different enough
that it's probably easier to keep them separate
* any function that doesn't take a hasMore
argument assumes that the
readers have not been drained yet, so we must check before calling them
* there is probably opportunity for optimisations