From 00fbf1a18513f48e9c44b3feaf346c5f40a6b188 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Tue, 9 Jun 2026 14:44:57 -0400 Subject: [PATCH] docs(inventory): explain two-phase prune query (SQLite constraint) Co-Authored-By: Claude Sonnet 4.6 --- SVSim.Database/Services/Inventory/InventoryTransaction.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/SVSim.Database/Services/Inventory/InventoryTransaction.cs b/SVSim.Database/Services/Inventory/InventoryTransaction.cs index cb82d66..2a99f75 100644 --- a/SVSim.Database/Services/Inventory/InventoryTransaction.cs +++ b/SVSim.Database/Services/Inventory/InventoryTransaction.cs @@ -296,6 +296,7 @@ internal sealed class InventoryTransaction : IInventoryTransaction private async Task PruneAcquireHistoryAsync(CancellationToken ct) { + // Two-phase: SQLite (used in tests) cannot translate Skip+OrderBy inside ExecuteDeleteAsync. var overflowIds = await _db.ViewerAcquireHistory .Where(h => h.ViewerId == Viewer.Id) .OrderByDescending(h => h.AcquireTime).ThenByDescending(h => h.Id)