mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-27 03:41:29 +01:00
new auto-commit transaction methods
This commit is contained in:
@@ -359,8 +359,17 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
|
||||
/**
|
||||
The internal `NSManagedObjectContext` managed by this instance. Using this context directly should typically be avoided, and is provided by CoreStore only for extremely specialized cases.
|
||||
*/
|
||||
public func internalContext() -> NSManagedObjectContext {
|
||||
public func unsafeContext() -> NSManagedObjectContext {
|
||||
|
||||
return self.context
|
||||
}
|
||||
|
||||
|
||||
// MARK: Deprecated
|
||||
|
||||
@available(*, deprecated: 4.0.0, renamed: "unsafeContext()")
|
||||
public func internalContext() -> NSManagedObjectContext {
|
||||
|
||||
return self.unsafeContext()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,8 +322,17 @@ extension DataStack: FetchableSource, QueryableSource {
|
||||
/**
|
||||
The internal `NSManagedObjectContext` managed by this instance. Using this context directly should typically be avoided, and is provided by CoreStore only for extremely specialized cases.
|
||||
*/
|
||||
public func internalContext() -> NSManagedObjectContext {
|
||||
public func unsafeContext() -> NSManagedObjectContext {
|
||||
|
||||
return self.mainContext
|
||||
}
|
||||
|
||||
|
||||
// MARK: Deprecated
|
||||
|
||||
@available(*, deprecated: 4.0.0, renamed: "unsafeContext()")
|
||||
public func internalContext() -> NSManagedObjectContext {
|
||||
|
||||
return self.unsafeContext()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,5 +159,11 @@ public protocol FetchableSource: class {
|
||||
/**
|
||||
The internal `NSManagedObjectContext` managed by this `FetchableSource`. Using this context directly should typically be avoided, and is provided by CoreStore only for extremely specialized cases.
|
||||
*/
|
||||
func unsafeContext() -> NSManagedObjectContext
|
||||
|
||||
|
||||
// MARK: Deprecated
|
||||
|
||||
@available(*, deprecated: 4.0.0, renamed: "unsafeContext()")
|
||||
func internalContext() -> NSManagedObjectContext
|
||||
}
|
||||
|
||||
@@ -85,5 +85,11 @@ public protocol QueryableSource: class {
|
||||
/**
|
||||
The internal `NSManagedObjectContext` managed by this `QueryableSource`. Using this context directly should typically be avoided, and is provided by CoreStore only for extremely specialized cases.
|
||||
*/
|
||||
func unsafeContext() -> NSManagedObjectContext
|
||||
|
||||
|
||||
// MARK: Deprecated
|
||||
|
||||
@available(*, deprecated: 4.0.0, renamed: "unsafeContext()")
|
||||
func internalContext() -> NSManagedObjectContext
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user