mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-29 05:41:50 +02:00
tidy up
This commit is contained in:
@@ -61,7 +61,7 @@ internal extension NSManagedObjectContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@nonobjc
|
@nonobjc
|
||||||
internal class func rootSavingContextForCoordinator(coordinator: NSPersistentStoreCoordinator) -> NSManagedObjectContext {
|
internal static func rootSavingContextForCoordinator(coordinator: NSPersistentStoreCoordinator) -> NSManagedObjectContext {
|
||||||
|
|
||||||
let context = NSManagedObjectContext(concurrencyType: .PrivateQueueConcurrencyType)
|
let context = NSManagedObjectContext(concurrencyType: .PrivateQueueConcurrencyType)
|
||||||
context.persistentStoreCoordinator = coordinator
|
context.persistentStoreCoordinator = coordinator
|
||||||
@@ -73,7 +73,7 @@ internal extension NSManagedObjectContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@nonobjc
|
@nonobjc
|
||||||
internal class func mainContextForRootContext(rootContext: NSManagedObjectContext) -> NSManagedObjectContext {
|
internal static func mainContextForRootContext(rootContext: NSManagedObjectContext) -> NSManagedObjectContext {
|
||||||
|
|
||||||
let context = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)
|
let context = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)
|
||||||
context.parentContext = rootContext
|
context.parentContext = rootContext
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ internal extension NSManagedObjectModel {
|
|||||||
// MARK: Internal
|
// MARK: Internal
|
||||||
|
|
||||||
@nonobjc
|
@nonobjc
|
||||||
internal class func fromBundle(bundle: NSBundle, modelName: String, modelVersionHints: Set<String> = []) -> NSManagedObjectModel {
|
internal static func fromBundle(bundle: NSBundle, modelName: String, modelVersionHints: Set<String> = []) -> NSManagedObjectModel {
|
||||||
|
|
||||||
guard let modelFilePath = bundle.pathForResource(modelName, ofType: "momd") else {
|
guard let modelFilePath = bundle.pathForResource(modelName, ofType: "momd") else {
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public extension CSCoreStore {
|
|||||||
Returns the `defaultStack`'s model version. The version string is the same as the name of the version-specific .xcdatamodeld file.
|
Returns the `defaultStack`'s model version. The version string is the same as the name of the version-specific .xcdatamodeld file.
|
||||||
*/
|
*/
|
||||||
@objc
|
@objc
|
||||||
public class var modelVersion: String {
|
public static var modelVersion: String {
|
||||||
|
|
||||||
return CoreStore.modelVersion
|
return CoreStore.modelVersion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public final class CSCoreStore: NSObject {
|
|||||||
Changing the `defaultStack` is thread safe, but it is recommended to setup stacks on a common queue (e.g. the main queue).
|
Changing the `defaultStack` is thread safe, but it is recommended to setup stacks on a common queue (e.g. the main queue).
|
||||||
*/
|
*/
|
||||||
@objc
|
@objc
|
||||||
public class var defaultStack: CSDataStack {
|
public static var defaultStack: CSDataStack {
|
||||||
|
|
||||||
get {
|
get {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user