File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,21 @@ class (IsSession (Session h)) => IsTable h where
185185 => NonEmpty (h m k v b )
186186 -> m (h m k v b )
187187
188+ remainingUnionDebt ::
189+ ( IOLike m
190+ , C k v b
191+ )
192+ => h m k v b
193+ -> m UnionDebt
194+
195+ supplyUnionCredits ::
196+ ( IOLike m
197+ , C k v b
198+ )
199+ => h m k v b
200+ -> UnionCredits
201+ -> m UnionCredits
202+
188203withTableNew :: forall h m k v b a .
189204 (IOLike m , IsTable h , C k v b )
190205 => Session h m
@@ -277,5 +292,8 @@ instance IsTable R.Table where
277292 openSnapshot sesh snap = R. openSnapshot sesh R. configNoOverride snap
278293
279294 duplicate = R. duplicate
295+
280296 union = R. union
281297 unions = R. unions
298+ remainingUnionDebt = R. remainingUnionDebt
299+ supplyUnionCredits = R. supplyUnionCredits
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import Data.Typeable (Typeable)
1515import Database.LSMTree (ResolveValue )
1616import Database.LSMTree.Common as Types (IOLike , Range (.. ),
1717 SerialiseKey , SerialiseValue , SnapshotLabel (.. ),
18- SnapshotName )
18+ SnapshotName , UnionCredits ( .. ), UnionDebt ( .. ) )
1919import qualified Database.LSMTree.Common as R
2020import System.FS.API (FsPath , HasFS )
2121import System.FS.BlockIO.API (HasBlockIO )
Original file line number Diff line number Diff line change @@ -92,8 +92,9 @@ instance Class.IsTable Table where
9292
9393 union (Table s1 t1) (Table _s2 t2) =
9494 Table s1 <$> runInOpenSession s1 (Model. union Model. getResolve t1 t2)
95-
9695 unions ts =
9796 Table s <$> runInOpenSession s (Model. unions Model. getResolve (fmap thTable ts))
9897 where
9998 Table s _ = NE. head ts
99+ remainingUnionDebt (Table s t) = runInOpenSession s (Model. remainingUnionDebt t)
100+ supplyUnionCredits (Table s t) credits = runInOpenSession s (Model. supplyUnionCredits t credits)
You can’t perform that action at this time.
0 commit comments