LocalStorage
public protocol LocalStorage : StorageInterface
The LocalStorage represents StorageInterfaces that are backed by local files.
-
The
NSURLthat points to the store fileDeclaration
Swift
var fileURL: URL { get } -
An array of
SchemaMappingProviders that provide the complete mapping models for custom migrations.Declaration
Swift
var migrationMappingProviders: [SchemaMappingProvider] { get } -
Options that tell the
DataStackhow to setup the persistent storeDeclaration
Swift
var localStorageOptions: LocalStorageOptions { get } -
The options dictionary for the specified
LocalStorageOptionsDeclaration
Swift
func dictionary(forOptions options: LocalStorageOptions) -> [AnyHashable : Any]? -
Called by the
DataStackto perform checkpoint operations on the storage. (SQLite stores for example, can convert the database’s WAL journaling mode to DELETE to force a checkpoint)Declaration
Swift
func cs_finalizeStorageAndWait(soureModelHint: NSManagedObjectModel) throws -
Called by the
DataStackto perform actual deletion of the store file from disk. Do not call directly! ThesourceModelargument is a hint for the existing store’s model version. Implementers can use thesourceModelto perform necessary store operations. (SQLite stores for example, can convert WAL journaling mode to DELETE before deleting)Declaration
Swift
func cs_eraseStorageAndWait(metadata: [String : Any], soureModelHint: NSManagedObjectModel?) throws
View on GitHub
LocalStorage Protocol Reference