diff --git a/LeStorage/StoredCollection+Sync.swift b/LeStorage/StoredCollection+Sync.swift index 59b817e..eaa3503 100644 --- a/LeStorage/StoredCollection+Sync.swift +++ b/LeStorage/StoredCollection+Sync.swift @@ -149,6 +149,11 @@ extension StoredCollection: SomeSyncedCollection where T : SyncedStorable { } + /// Proceeds to delete all instance of the collection, properly cleaning up dependencies and sending API calls + public func deleteAll() throws { + self.delete(contentOfs: self.items) + } + /// Deletes all items of the sequence by id and sets the collection as changed to trigger a write public func delete(contentOfs sequence: any Sequence) { diff --git a/LeStorage/StoredCollection.swift b/LeStorage/StoredCollection.swift index bb837ee..003c098 100644 --- a/LeStorage/StoredCollection.swift +++ b/LeStorage/StoredCollection.swift @@ -331,9 +331,9 @@ public class StoredCollection: RandomAccessCollection, SomeCollecti } /// Proceeds to delete all instance of the collection, properly cleaning up dependencies and sending API calls - // public func deleteAll() throws { - // try self.delete(contentOfs: self.items) - // } + public func deleteAll() throws { + self.delete(contentOfs: self.items) + } // MARK: - SomeCall