Support typed errors. Misc formatting

This commit is contained in:
John Estropia
2024-09-10 11:14:39 +09:00
parent c9e091a6a4
commit 5dcf29011a
74 changed files with 3987 additions and 1441 deletions

View File

@@ -139,17 +139,24 @@ public protocol LocalStorage: StorageInterface {
/**
The options dictionary for the specified `LocalStorageOptions`
*/
func dictionary(forOptions options: LocalStorageOptions) -> [AnyHashable: Any]?
func dictionary(
forOptions options: LocalStorageOptions
) -> [AnyHashable: Any]?
/**
Called by the `DataStack` to perform checkpoint operations on the storage. (SQLite stores for example, can convert the database's WAL journaling mode to DELETE to force a checkpoint)
*/
func cs_finalizeStorageAndWait(soureModelHint: NSManagedObjectModel) throws
func cs_finalizeStorageAndWait(
soureModelHint: NSManagedObjectModel
) throws(any Swift.Error)
/**
Called by the `DataStack` to perform actual deletion of the store file from disk. **Do not call directly!** The `sourceModel` argument is a hint for the existing store's model version. Implementers can use the `sourceModel` to perform necessary store operations. (SQLite stores for example, can convert WAL journaling mode to DELETE before deleting)
*/
func cs_eraseStorageAndWait(metadata: [String: Any], soureModelHint: NSManagedObjectModel?) throws
func cs_eraseStorageAndWait(
metadata: [String: Any],
soureModelHint: NSManagedObjectModel?
) throws(any Swift.Error)
}
extension LocalStorage {