mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-31 14:43:09 +02:00
fix warnings on watchOS
This commit is contained in:
@@ -146,7 +146,8 @@ public extension DataStack {
|
|||||||
|
|
||||||
let metadata = try NSPersistentStoreCoordinator.metadataForPersistentStoreOfType(
|
let metadata = try NSPersistentStoreCoordinator.metadataForPersistentStoreOfType(
|
||||||
NSSQLiteStoreType,
|
NSSQLiteStoreType,
|
||||||
URL: fileURL
|
URL: fileURL,
|
||||||
|
options: self.optionsForSQLiteStore()
|
||||||
)
|
)
|
||||||
|
|
||||||
return self.upgradeSQLiteStoreIfNeeded(
|
return self.upgradeSQLiteStoreIfNeeded(
|
||||||
@@ -265,7 +266,8 @@ public extension DataStack {
|
|||||||
|
|
||||||
metadata = try NSPersistentStoreCoordinator.metadataForPersistentStoreOfType(
|
metadata = try NSPersistentStoreCoordinator.metadataForPersistentStoreOfType(
|
||||||
NSSQLiteStoreType,
|
NSSQLiteStoreType,
|
||||||
URL: fileURL
|
URL: fileURL,
|
||||||
|
options: self.optionsForSQLiteStore()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
@@ -323,7 +325,8 @@ public extension DataStack {
|
|||||||
|
|
||||||
metadata = try NSPersistentStoreCoordinator.metadataForPersistentStoreOfType(
|
metadata = try NSPersistentStoreCoordinator.metadataForPersistentStoreOfType(
|
||||||
NSSQLiteStoreType,
|
NSSQLiteStoreType,
|
||||||
URL: fileURL
|
URL: fileURL,
|
||||||
|
options: self.optionsForSQLiteStore()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
|||||||
@@ -213,6 +213,7 @@ public final class DataStack {
|
|||||||
|
|
||||||
var store: NSPersistentStore?
|
var store: NSPersistentStore?
|
||||||
var storeError: NSError?
|
var storeError: NSError?
|
||||||
|
let options = self.optionsForSQLiteStore()
|
||||||
coordinator.performBlockAndWait {
|
coordinator.performBlockAndWait {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -221,7 +222,7 @@ public final class DataStack {
|
|||||||
NSSQLiteStoreType,
|
NSSQLiteStoreType,
|
||||||
configuration: configuration,
|
configuration: configuration,
|
||||||
URL: fileURL,
|
URL: fileURL,
|
||||||
options: [NSSQLitePragmasOption: ["journal_mode": "WAL"]]
|
options: options
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
@@ -293,6 +294,11 @@ public final class DataStack {
|
|||||||
return migrationQueue
|
return migrationQueue
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
internal func optionsForSQLiteStore() -> [String: AnyObject] {
|
||||||
|
|
||||||
|
return [NSSQLitePragmasOption: ["journal_mode": "WAL"]]
|
||||||
|
}
|
||||||
|
|
||||||
internal func entityNameForEntityClass(entityClass: AnyClass) -> String? {
|
internal func entityNameForEntityClass(entityClass: AnyClass) -> String? {
|
||||||
|
|
||||||
return self.model.entityNameForClass(entityClass)
|
return self.model.entityNameForClass(entityClass)
|
||||||
|
|||||||
Reference in New Issue
Block a user