99-- Until then, the documentation on definitions in this module is omitted.
1010module Database.LSMTree (
1111 -- * Exceptions
12- Common. LSMTreeError (.. )
12+ Common. SessionDirDoesNotExistError (.. )
13+ , Common. SessionDirLockedError (.. )
14+ , Common. SessionDirCorruptedError (.. )
15+ , Common. SessionClosedError (.. )
16+ , Common. TableClosedError (.. )
17+ , Common. TableCorruptedError (.. )
18+ , Common. TableTooLargeError (.. )
19+ , Common. TableNotCompatibleError (.. )
20+ , Common. SnapshotExistsError (.. )
21+ , Common. SnapshotDoesNotExistError (.. )
22+ , Common. SnapshotCorruptedError (.. )
23+ , Common. SnapshotNotCompatibleError (.. )
24+ , Common. BlobRefInvalidError (.. )
25+ , Common. CursorClosedError (.. )
26+ , Common. FileFormat (.. )
27+ , Common. FileCorruptedError (.. )
1328 , Common. InvalidSnapshotNameError (.. )
1429
1530 -- * Tracing
@@ -67,7 +82,7 @@ module Database.LSMTree (
6782 , retrieveBlobs
6883
6984 -- * Durability (snapshots)
70- , SnapshotName
85+ , Common. SnapshotName
7186 , Common. isValidSnapshotName
7287 , Common. toSnapshotName
7388 , Common. SnapshotLabel (.. )
@@ -117,16 +132,15 @@ import Data.List.NonEmpty (NonEmpty (..))
117132import Data.Typeable (Proxy (.. ), Typeable , eqT , type (:~: ) (Refl ))
118133import qualified Data.Vector as V
119134import Database.LSMTree.Common (BlobRef (BlobRef ), IOLike , Range (.. ),
120- SerialiseKey , SerialiseValue , Session , SnapshotName ,
121- UnionCredits ( .. ), UnionDebt (.. ), closeSession ,
122- deleteSnapshot , listSnapshots , openSession , withSession )
135+ SerialiseKey , SerialiseValue , Session , UnionCredits ( .. ) ,
136+ UnionDebt (.. ), closeSession , deleteSnapshot ,
137+ listSnapshots , openSession , withSession )
123138import qualified Database.LSMTree.Common as Common
124139import qualified Database.LSMTree.Internal as Internal
125140import qualified Database.LSMTree.Internal.BlobRef as Internal
126141import qualified Database.LSMTree.Internal.Entry as Entry
127142import qualified Database.LSMTree.Internal.RawBytes as RB
128143import qualified Database.LSMTree.Internal.Serialise as Internal
129- import qualified Database.LSMTree.Internal.Snapshot as Internal
130144import qualified Database.LSMTree.Internal.Vector as V
131145import Database.LSMTree.Monoidal (ResolveValue (.. ),
132146 resolveDeserialised , resolveValueAssociativity ,
@@ -476,24 +490,24 @@ retrieveBlobs (Internal.Session' (sesh :: Internal.Session m h)) refs =
476490
477491{-# SPECIALISE createSnapshot ::
478492 Common.SnapshotLabel
479- -> SnapshotName
493+ -> Common. SnapshotName
480494 -> Table IO k v b
481495 -> IO () #-}
482496createSnapshot :: forall m k v b .
483497 IOLike m
484498 => Common. SnapshotLabel
485- -> SnapshotName
499+ -> Common. SnapshotName
486500 -> Table m k v b
487501 -> m ()
488502createSnapshot label snap (Internal. Table' t) =
489- void $ Internal. createSnapshot snap label Internal . SnapFullTable t
503+ void $ Internal. createSnapshot snap label Common . SnapFullTable t
490504
491505{-# SPECIALISE openSnapshot ::
492506 ResolveValue v
493507 => Session IO
494508 -> Common.TableConfigOverride
495509 -> Common.SnapshotLabel
496- -> SnapshotName
510+ -> Common. SnapshotName
497511 -> IO (Table IO k v b ) #-}
498512openSnapshot :: forall m k v b .
499513 ( IOLike m
@@ -502,10 +516,10 @@ openSnapshot :: forall m k v b.
502516 => Session m
503517 -> Common. TableConfigOverride -- ^ Optional config override
504518 -> Common. SnapshotLabel
505- -> SnapshotName
519+ -> Common. SnapshotName
506520 -> m (Table m k v b )
507521openSnapshot (Internal. Session' sesh) override label snap =
508- Internal. Table' <$!> Internal. openSnapshot sesh label Internal . SnapFullTable override snap (resolve (Proxy @ v ))
522+ Internal. Table' <$!> Internal. openSnapshot sesh label Common . SnapFullTable override snap (resolve (Proxy @ v ))
509523
510524{- ------------------------------------------------------------------------------
511525 Mutiple writable tables
@@ -556,7 +570,7 @@ unions (t :| ts) =
556570 -> m (Internal. Table m h )
557571 checkTableType _ i (Internal. Table' (t' :: Internal. Table m h' ))
558572 | Just Refl <- eqT @ h @ h' = pure t'
559- | otherwise = throwIO (Internal. ErrUnionsTableTypeMismatch 0 i)
573+ | otherwise = throwIO (Common. ErrTableTypeMismatch 0 i)
560574
561575{-# SPECIALISE remainingUnionDebt :: Table IO k v b -> IO UnionDebt #-}
562576remainingUnionDebt :: IOLike m => Table m k v b -> m UnionDebt
0 commit comments