mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-05-05 07:23:59 +02:00
fix compiler errors
This commit is contained in:
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - BaseDataTransaction
|
||||
|
||||
public extension BaseDataTransaction {
|
||||
extension BaseDataTransaction {
|
||||
|
||||
/**
|
||||
Creates an `ImportableObject` by importing from the specified import source.
|
||||
|
||||
@@ -565,7 +565,7 @@ extension BaseDataTransaction: FetchableSource, QueryableSource {
|
||||
|
||||
// MARK: Obsoleted
|
||||
|
||||
@available(*, obsoleted: 3.1, renamed: "unsafeContext()")
|
||||
@available(swift, obsoleted: 3.1, renamed: "unsafeContext()")
|
||||
public func internalContext() -> NSManagedObjectContext {
|
||||
|
||||
fatalError()
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CSBaseDataTransaction
|
||||
|
||||
public extension CSBaseDataTransaction {
|
||||
extension CSBaseDataTransaction {
|
||||
|
||||
/**
|
||||
Fetches the `NSManagedObject` instance in the transaction's context from a reference created from a transaction or from a different managed object context.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CSCoreStore
|
||||
|
||||
public extension CSCoreStore {
|
||||
extension CSCoreStore {
|
||||
|
||||
/**
|
||||
Asynchronously adds a `CSInMemoryStore` to the `defaultStack`. Migrations are also initiated by default.
|
||||
|
||||
@@ -30,7 +30,7 @@ import CoreData
|
||||
// MARK: - CSCoreStore
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension CSCoreStore {
|
||||
extension CSCoreStore {
|
||||
|
||||
/**
|
||||
Using the `defaultStack`, creates an `CSObjectMonitor` for the specified `NSManagedObject`. Multiple `CSObjectObserver`s may then register themselves to be notified when changes are made to the `NSManagedObject`.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CSCoreStore
|
||||
|
||||
public extension CSCoreStore {
|
||||
extension CSCoreStore {
|
||||
|
||||
/**
|
||||
Using the `defaultStack`, fetches the `NSManagedObject` instance in the transaction's context from a reference created from a transaction or from a different managed object context.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CSCoreStore
|
||||
|
||||
public extension CSCoreStore {
|
||||
extension CSCoreStore {
|
||||
|
||||
/**
|
||||
Returns the `defaultStack`'s model version. The version string is the same as the name of the version-specific .xcdatamodeld file.
|
||||
|
||||
@@ -28,7 +28,7 @@ import Foundation
|
||||
|
||||
// MARK: - CSCoreStore
|
||||
|
||||
public extension CSCoreStore {
|
||||
extension CSCoreStore {
|
||||
|
||||
/**
|
||||
Using the `defaultStack`, begins a transaction asynchronously where `NSManagedObject` creates, updates, and deletes can be made.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CSDataStack
|
||||
|
||||
public extension CSDataStack {
|
||||
extension CSDataStack {
|
||||
|
||||
/**
|
||||
Asynchronously adds a `CSInMemoryStore` to the stack. Migrations are also initiated by default.
|
||||
|
||||
@@ -30,7 +30,7 @@ import CoreData
|
||||
// MARK: - CSDataStack
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension CSDataStack {
|
||||
extension CSDataStack {
|
||||
|
||||
/**
|
||||
Creates a `CSObjectMonitor` for the specified `NSManagedObject`. Multiple `ObjectObserver`s may then register themselves to be notified when changes are made to the `NSManagedObject`.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CSDataStack
|
||||
|
||||
public extension CSDataStack {
|
||||
extension CSDataStack {
|
||||
|
||||
/**
|
||||
Fetches the `NSManagedObject` instance in the transaction's context from a reference created from a transaction or from a different managed object context.
|
||||
|
||||
@@ -28,7 +28,7 @@ import Foundation
|
||||
|
||||
// MARK: - CSDataStack
|
||||
|
||||
public extension CSDataStack {
|
||||
extension CSDataStack {
|
||||
|
||||
/**
|
||||
Begins a transaction asynchronously where `NSManagedObject` creates, updates, and deletes can be made.
|
||||
|
||||
@@ -262,7 +262,7 @@ extension CoreStoreError: CoreStoreSwiftType, _ObjectiveCBridgeableError {
|
||||
|
||||
// MARK: Internal
|
||||
|
||||
internal extension Error {
|
||||
extension Error {
|
||||
|
||||
internal var bridgeToSwift: CoreStoreError {
|
||||
|
||||
|
||||
@@ -195,14 +195,14 @@ public final class CSSQLiteStore: NSObject, CSLocalStorage, CoreStoreObjectiveCT
|
||||
|
||||
// MARK: Obsoleted
|
||||
|
||||
@available(*, obsoleted: 3.1, message: "The `mappingModelBundles` argument of this method is ignored. Use the new -[CSSQLiteStore initWithFileURL:configuration:localStorageOptions:]) initializer instead.")
|
||||
@available(swift, obsoleted: 3.1, message: "The `mappingModelBundles` argument of this method is ignored. Use the new -[CSSQLiteStore initWithFileURL:configuration:localStorageOptions:]) initializer instead.")
|
||||
@objc
|
||||
public convenience init(fileURL: URL, configuration: ModelConfiguration, mappingModelBundles: [Bundle]?, localStorageOptions: Int) {
|
||||
|
||||
fatalError()
|
||||
}
|
||||
|
||||
@available(*, obsoleted: 3.1, message: "The `mappingModelBundles` argument of this method is ignored. Use the new -[CSSQLiteStore initWithFileName:configuration:localStorageOptions:]) initializer instead.")
|
||||
@available(swift, obsoleted: 3.1, message: "The `mappingModelBundles` argument of this method is ignored. Use the new -[CSSQLiteStore initWithFileName:configuration:localStorageOptions:]) initializer instead.")
|
||||
@objc
|
||||
public convenience init(fileName: String, configuration: ModelConfiguration, mappingModelBundles: [Bundle]?, localStorageOptions: Int) {
|
||||
|
||||
|
||||
@@ -1111,7 +1111,7 @@ private func createFormattedString(_ firstLine: String, _ lastLine: String, _ in
|
||||
return string
|
||||
}
|
||||
|
||||
fileprivate extension String {
|
||||
extension String {
|
||||
|
||||
fileprivate static func indention(_ level: Int = 1) -> String {
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import Foundation
|
||||
|
||||
// MARK: - CoreStore
|
||||
|
||||
public extension CoreStore {
|
||||
extension CoreStore {
|
||||
|
||||
/**
|
||||
The `CoreStoreLogger` instance to be used. The default logger is an instance of a `DefaultLogger`.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CoreStore
|
||||
|
||||
public extension CoreStore {
|
||||
extension CoreStore {
|
||||
|
||||
/**
|
||||
Asynchronously adds a `StorageInterface` to the `defaultStack`. Migrations are also initiated by default.
|
||||
|
||||
@@ -30,7 +30,7 @@ import CoreData
|
||||
// MARK: - CoreStore
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension CoreStore {
|
||||
extension CoreStore {
|
||||
|
||||
/**
|
||||
Using the `defaultStack`, creates an `ObjectMonitor` for the specified `DynamicObject`. Multiple `ObjectObserver`s may then register themselves to be notified when changes are made to the `DynamicObject`.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CoreStore
|
||||
|
||||
public extension CoreStore {
|
||||
extension CoreStore {
|
||||
|
||||
/**
|
||||
Using the `defaultStack`, fetches the `DynamicObject` instance in the `DataStack`'s context from a reference created from a transaction or from a different managed object context.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CoreStore
|
||||
|
||||
public extension CoreStore {
|
||||
extension CoreStore {
|
||||
|
||||
/**
|
||||
Returns the `defaultStack`'s model version. The version string is the same as the name of a version-specific .xcdatamodeld file or `CoreStoreSchema`.
|
||||
@@ -152,7 +152,7 @@ public extension CoreStore {
|
||||
|
||||
// MARK: Obsolete
|
||||
|
||||
@available(*, obsoleted: 3.1, renamed: "entityDescription(for:)")
|
||||
@available(swift, obsoleted: 3.1, renamed: "entityDescription(for:)")
|
||||
public static func entityDescriptionForType(_ type: NSManagedObject.Type) -> NSEntityDescription? {
|
||||
|
||||
return self.entityDescription(for: type)
|
||||
|
||||
@@ -28,7 +28,7 @@ import Foundation
|
||||
|
||||
// MARK: - CoreStore
|
||||
|
||||
public extension CoreStore {
|
||||
extension CoreStore {
|
||||
|
||||
/**
|
||||
Using the `defaultStack`, performs a transaction asynchronously where `NSManagedObject` or `CoreStoreObject` creates, updates, and deletes can be made. The changes are commited automatically after the `task` closure returns. On success, the value returned from closure will be the wrapped as `.success(userInfo: T)` in the `completion`'s `Result<T>`. Any errors thrown from inside the `task` will be reported as `.failure(error: CoreStoreError)`. To cancel/rollback changes, call `try transaction.cancel()`, which throws a `CoreStoreError.userCancelled`.
|
||||
|
||||
@@ -332,7 +332,7 @@ public enum CoreStoreErrorCode: Int {
|
||||
|
||||
// MARK: - NSError
|
||||
|
||||
internal extension NSError {
|
||||
extension NSError {
|
||||
|
||||
// MARK: Internal
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CoreStoreFetchRequest
|
||||
|
||||
internal extension CoreStoreFetchRequest {
|
||||
extension CoreStoreFetchRequest {
|
||||
|
||||
// MARK: Internal
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - CoreStoreObject
|
||||
|
||||
public extension CoreStoreObject {
|
||||
extension CoreStoreObject {
|
||||
|
||||
/**
|
||||
Exposes a `FetchableSource` that can fetch sibling objects of this `CoreStoreObject` instance. This may be the `DataStack`, a `BaseDataTransaction`, the `NSManagedObjectContext` itself, or `nil` if the obejct's parent is already deallocated.
|
||||
|
||||
@@ -29,7 +29,7 @@ import Foundation
|
||||
|
||||
// MARK: - ValueContainer.Required
|
||||
|
||||
public extension ValueContainer.Required {
|
||||
extension ValueContainer.Required {
|
||||
|
||||
/**
|
||||
Creates a `Where` clause by comparing if a property is equal to a value
|
||||
@@ -112,7 +112,7 @@ public extension ValueContainer.Required {
|
||||
|
||||
// MARK: - ValueContainer.Optional
|
||||
|
||||
public extension ValueContainer.Optional {
|
||||
extension ValueContainer.Optional {
|
||||
|
||||
/**
|
||||
Creates a `Where` clause by comparing if a property is equal to a value
|
||||
@@ -223,7 +223,7 @@ public extension ValueContainer.Optional {
|
||||
|
||||
// MARK: - RelationshipContainer.ToOne
|
||||
|
||||
public extension RelationshipContainer.ToOne {
|
||||
extension RelationshipContainer.ToOne {
|
||||
|
||||
/**
|
||||
Creates a `Where` clause by comparing if a property is equal to a value
|
||||
|
||||
@@ -140,7 +140,7 @@ open /*abstract*/ class CoreStoreObject: DynamicObject, Hashable {
|
||||
|
||||
// MARK: - DynamicObject where Self: CoreStoreObject
|
||||
|
||||
public extension DynamicObject where Self: CoreStoreObject {
|
||||
extension DynamicObject where Self: CoreStoreObject {
|
||||
|
||||
/**
|
||||
Returns the `PartialObject` instance for the object, which acts as a fast, type-safe KVC interface for `CoreStoreObject`.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - DataStack
|
||||
|
||||
public extension DataStack {
|
||||
extension DataStack {
|
||||
|
||||
/**
|
||||
Asynchronously adds a `StorageInterface` to the stack. Migrations are also initiated by default.
|
||||
@@ -837,7 +837,7 @@ public extension DataStack {
|
||||
|
||||
// MARK: - FilePrivate
|
||||
|
||||
fileprivate extension Array where Element == SchemaMappingProvider {
|
||||
extension Array where Element == SchemaMappingProvider {
|
||||
|
||||
func findMapping(sourceSchema: DynamicSchema, destinationSchema: DynamicSchema, storage: LocalStorage) throws -> (mappingModel: NSMappingModel, migrationType: MigrationType) {
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import CoreData
|
||||
// MARK: - DataStack
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension DataStack {
|
||||
extension DataStack {
|
||||
|
||||
/**
|
||||
Creates an `ObjectMonitor` for the specified `DynamicObject`. Multiple `ObjectObserver`s may then register themselves to be notified when changes are made to the `DynamicObject`.
|
||||
|
||||
@@ -511,7 +511,7 @@ extension DataStack: FetchableSource, QueryableSource {
|
||||
|
||||
// MARK: Obsoleted
|
||||
|
||||
@available(*, obsoleted: 3.1, renamed: "unsafeContext()")
|
||||
@available(swift, obsoleted: 3.1, renamed: "unsafeContext()")
|
||||
public func internalContext() -> NSManagedObjectContext {
|
||||
|
||||
fatalError()
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - DataStack
|
||||
|
||||
public extension DataStack {
|
||||
extension DataStack {
|
||||
|
||||
/**
|
||||
Performs a transaction asynchronously where `NSManagedObject` or `CoreStoreObject` creates, updates, and deletes can be made. The changes are commited automatically after the `task` closure returns. On success, the value returned from closure will be the wrapped as `.success(userInfo: T)` in the `completion`'s `Result<T>`. Any errors thrown from inside the `task` will be reported as `.failure(error: CoreStoreError)`. To cancel/rollback changes, call `try transaction.cancel()`, which throws a `CoreStoreError.userCancelled`.
|
||||
|
||||
@@ -656,13 +656,13 @@ public final class DataStack: Equatable {
|
||||
|
||||
// MARK: Obsolete
|
||||
|
||||
@available(*, obsoleted: 3.1, renamed: "entityDescription(for:)")
|
||||
@available(swift, obsoleted: 3.1, renamed: "entityDescription(for:)")
|
||||
public func entityDescriptionForType(_ type: NSManagedObject.Type) -> NSEntityDescription? {
|
||||
|
||||
return self.entityDescription(for: type)
|
||||
}
|
||||
|
||||
@available(*, obsoleted: 3.1, renamed: "objectID(forURIRepresentation:)")
|
||||
@available(swift, obsoleted: 3.1, renamed: "objectID(forURIRepresentation:)")
|
||||
public func objectIDForURIRepresentation(_ url: URL) -> NSManagedObjectID? {
|
||||
|
||||
return self.objectID(forURIRepresentation: url)
|
||||
|
||||
@@ -28,7 +28,7 @@ import Foundation
|
||||
|
||||
// MARK: - DispatchQueue
|
||||
|
||||
internal extension DispatchQueue {
|
||||
extension DispatchQueue {
|
||||
|
||||
@nonobjc @inline(__always)
|
||||
internal static func serial(_ label: String, qos: DispatchQoS = .default) -> DispatchQueue {
|
||||
|
||||
@@ -58,7 +58,7 @@ public protocol DynamicKeyPath: AnyDynamicKeyPath {
|
||||
|
||||
// MARK: - KeyPathString
|
||||
|
||||
public extension KeyPathString {
|
||||
extension KeyPathString {
|
||||
|
||||
/**
|
||||
Extracts the keyPath string from the property.
|
||||
@@ -78,7 +78,7 @@ public extension KeyPathString {
|
||||
```
|
||||
*/
|
||||
public init<O: CoreStoreObject, K: DynamicKeyPath>(keyPath: KeyPath<O, K>) {
|
||||
|
||||
|
||||
self = O.meta[keyPath: keyPath].cs_keyPathString
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import Foundation
|
||||
|
||||
// MARK: - DynamicSchema
|
||||
|
||||
public extension DynamicSchema {
|
||||
extension DynamicSchema {
|
||||
|
||||
/**
|
||||
Prints the `DynamicSchema` as their corresponding `CoreStoreObject` Swift declarations. This is useful for converting current `XcodeDataModelSchema`-based models into the new `CoreStoreSchema` framework. Additional adjustments may need to be done to the generated source code; for example: `Transformable` concrete types need to be provided, as well as `default` values.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - From
|
||||
|
||||
public extension From {
|
||||
extension From {
|
||||
|
||||
/**
|
||||
Creates a `FetchChainBuilder` that starts with the specified `Where` clause
|
||||
@@ -240,7 +240,7 @@ public extension From {
|
||||
|
||||
// MARK: - From where D: NSManagedObject
|
||||
|
||||
public extension From where D: NSManagedObject {
|
||||
extension From where D: NSManagedObject {
|
||||
|
||||
/**
|
||||
Creates a `QueryChainBuilder` that starts with a `Select` clause created from the specified key path
|
||||
@@ -283,7 +283,7 @@ public extension From where D: NSManagedObject {
|
||||
|
||||
// MARK: - From where D: CoreStoreObject
|
||||
|
||||
public extension From where D: CoreStoreObject {
|
||||
extension From where D: CoreStoreObject {
|
||||
|
||||
/**
|
||||
Creates a `FetchChainBuilder` that starts with the specified `Where` clause
|
||||
@@ -453,7 +453,7 @@ public extension From where D: CoreStoreObject {
|
||||
|
||||
// MARK: - FetchChainBuilder
|
||||
|
||||
public extension FetchChainBuilder {
|
||||
extension FetchChainBuilder {
|
||||
|
||||
/**
|
||||
Adds a `Where` clause to the `FetchChainBuilder`
|
||||
@@ -580,7 +580,7 @@ public extension FetchChainBuilder {
|
||||
|
||||
// MARK: - FetchChainBuilder where D: CoreStoreObject
|
||||
|
||||
public extension FetchChainBuilder where D: CoreStoreObject {
|
||||
extension FetchChainBuilder where D: CoreStoreObject {
|
||||
|
||||
public func `where`<T: AnyWhereClause>(_ clause: (D) -> T) -> FetchChainBuilder<D> {
|
||||
|
||||
@@ -591,7 +591,7 @@ public extension FetchChainBuilder where D: CoreStoreObject {
|
||||
|
||||
// MARK: - QueryChainBuilder
|
||||
|
||||
public extension QueryChainBuilder {
|
||||
extension QueryChainBuilder {
|
||||
|
||||
/**
|
||||
Adds a `Where` clause to the `QueryChainBuilder`
|
||||
@@ -754,7 +754,7 @@ public extension QueryChainBuilder {
|
||||
|
||||
// MARK: - QueryChainBuilder where D: NSManagedObject
|
||||
|
||||
public extension QueryChainBuilder where D: NSManagedObject {
|
||||
extension QueryChainBuilder where D: NSManagedObject {
|
||||
|
||||
/**
|
||||
Adds a `GroupBy` clause to the `QueryChainBuilder`
|
||||
@@ -771,7 +771,7 @@ public extension QueryChainBuilder where D: NSManagedObject {
|
||||
|
||||
// MARK: - QueryChainBuilder where D: CoreStoreObject
|
||||
|
||||
public extension QueryChainBuilder where D: CoreStoreObject {
|
||||
extension QueryChainBuilder where D: CoreStoreObject {
|
||||
|
||||
/**
|
||||
Adds a `Where` clause to the `QueryChainBuilder`
|
||||
@@ -833,7 +833,7 @@ public extension QueryChainBuilder where D: CoreStoreObject {
|
||||
// MARK: - SectionMonitorChainBuilder
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension SectionMonitorChainBuilder {
|
||||
extension SectionMonitorChainBuilder {
|
||||
|
||||
/**
|
||||
Adds a `Where` clause to the `SectionMonitorChainBuilder`
|
||||
@@ -963,7 +963,7 @@ public extension SectionMonitorChainBuilder {
|
||||
// MARK: - SectionMonitorChainBuilder where D: CoreStoreObject
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension SectionMonitorChainBuilder where D: CoreStoreObject {
|
||||
extension SectionMonitorChainBuilder where D: CoreStoreObject {
|
||||
|
||||
/**
|
||||
Adds a `Where` clause to the `SectionMonitorChainBuilder`
|
||||
|
||||
@@ -103,7 +103,7 @@ public struct GroupBy<D: DynamicObject>: GroupByClause, QueryClause, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
public extension GroupBy where D: NSManagedObject {
|
||||
extension GroupBy where D: NSManagedObject {
|
||||
|
||||
/**
|
||||
Initializes a `GroupBy` clause with a key path
|
||||
@@ -116,7 +116,7 @@ public extension GroupBy where D: NSManagedObject {
|
||||
}
|
||||
}
|
||||
|
||||
public extension GroupBy where D: CoreStoreObject {
|
||||
extension GroupBy where D: CoreStoreObject {
|
||||
|
||||
/**
|
||||
Initializes a `GroupBy` clause with a key path
|
||||
|
||||
@@ -554,7 +554,7 @@ public final class ICloudStore: CloudStorage, CustomDebugStringConvertible, Core
|
||||
|
||||
// MARK: - Notification Keys
|
||||
|
||||
fileprivate extension Notification.Name {
|
||||
extension Notification.Name {
|
||||
|
||||
fileprivate static let iCloudUbiquitousStoreWillFinishInitialImport = Notification.Name(rawValue: "iCloudUbiquitousStoreWillFinishInitialImport")
|
||||
fileprivate static let iCloudUbiquitousStoreDidFinishInitialImport = Notification.Name(rawValue: "iCloudUbiquitousStoreDidFinishInitialImport")
|
||||
|
||||
@@ -80,9 +80,9 @@ public protocol ImportableObject: DynamicObject {
|
||||
|
||||
// MARK: - ImportableObject (Default Implementations)
|
||||
|
||||
public extension ImportableObject {
|
||||
extension ImportableObject {
|
||||
|
||||
static func shouldInsert(from source: ImportSource, in transaction: BaseDataTransaction) -> Bool {
|
||||
public static func shouldInsert(from source: ImportSource, in transaction: BaseDataTransaction) -> Bool {
|
||||
|
||||
return true
|
||||
}
|
||||
@@ -90,14 +90,14 @@ public extension ImportableObject {
|
||||
|
||||
// MARK: Obsolete
|
||||
|
||||
@available(*, obsoleted: 3.0.0, renamed: "shouldInsert(from:in:)")
|
||||
static func shouldInsertFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) -> Bool {
|
||||
@available(swift, obsoleted: 3.0.0, renamed: "shouldInsert(from:in:)")
|
||||
public static func shouldInsertFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) -> Bool {
|
||||
|
||||
return Self.shouldInsert(from: source, in: transaction)
|
||||
}
|
||||
|
||||
@available(*, obsoleted: 3.0.0, renamed: "didInsert(from:in:)")
|
||||
func didInsertFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) throws {
|
||||
@available(swift, obsoleted: 3.0.0, renamed: "didInsert(from:in:)")
|
||||
public func didInsertFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) throws {
|
||||
|
||||
try self.didInsert(from: source, in: transaction)
|
||||
}
|
||||
|
||||
@@ -116,11 +116,11 @@ public protocol ImportableUniqueObject: ImportableObject {
|
||||
}
|
||||
|
||||
|
||||
// MARK: - ImportableUniqueObject (Default Implementations)
|
||||
// MARK: - ImportableUniqueObject where UniqueIDType.QueryableNativeType: CoreDataNativeType
|
||||
|
||||
public extension ImportableUniqueObject where UniqueIDType.QueryableNativeType: CoreDataNativeType {
|
||||
extension ImportableUniqueObject where UniqueIDType.QueryableNativeType: CoreDataNativeType {
|
||||
|
||||
var uniqueIDValue: UniqueIDType {
|
||||
public var uniqueIDValue: UniqueIDType {
|
||||
|
||||
get {
|
||||
|
||||
@@ -141,19 +141,22 @@ public extension ImportableUniqueObject where UniqueIDType.QueryableNativeType:
|
||||
}
|
||||
}
|
||||
|
||||
public extension ImportableUniqueObject {
|
||||
|
||||
// MARK: - ImportableUniqueObject
|
||||
|
||||
extension ImportableUniqueObject {
|
||||
|
||||
static func shouldInsert(from source: ImportSource, in transaction: BaseDataTransaction) -> Bool {
|
||||
public static func shouldInsert(from source: ImportSource, in transaction: BaseDataTransaction) -> Bool {
|
||||
|
||||
return Self.shouldUpdate(from: source, in: transaction)
|
||||
}
|
||||
|
||||
static func shouldUpdate(from source: ImportSource, in transaction: BaseDataTransaction) -> Bool{
|
||||
public static func shouldUpdate(from source: ImportSource, in transaction: BaseDataTransaction) -> Bool{
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func didInsert(from source: Self.ImportSource, in transaction: BaseDataTransaction) throws {
|
||||
public func didInsert(from source: Self.ImportSource, in transaction: BaseDataTransaction) throws {
|
||||
|
||||
try self.update(from: source, in: transaction)
|
||||
}
|
||||
@@ -161,32 +164,32 @@ public extension ImportableUniqueObject {
|
||||
|
||||
// MARK: Obsolete
|
||||
|
||||
@available(*, obsoleted: 3.1, renamed: "shouldInsert(from:in:)")
|
||||
static func shouldInsertFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) -> Bool {
|
||||
@available(swift, obsoleted: 3.1, renamed: "shouldInsert(from:in:)")
|
||||
public static func shouldInsertFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) -> Bool {
|
||||
|
||||
return Self.shouldInsert(from: source, in: transaction)
|
||||
}
|
||||
|
||||
@available(*, obsoleted: 3.1, renamed: "shouldUpdate(from:in:)")
|
||||
static func shouldUpdateFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) -> Bool {
|
||||
@available(swift, obsoleted: 3.1, renamed: "shouldUpdate(from:in:)")
|
||||
public static func shouldUpdateFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) -> Bool {
|
||||
|
||||
return Self.shouldUpdate(from: source, in: transaction)
|
||||
}
|
||||
|
||||
@available(*, obsoleted: 3.1, renamed: "uniqueID(from:in:)")
|
||||
static func uniqueIDFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) throws -> UniqueIDType? {
|
||||
@available(swift, obsoleted: 3.1, renamed: "uniqueID(from:in:)")
|
||||
public static func uniqueIDFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) throws -> UniqueIDType? {
|
||||
|
||||
return try Self.uniqueID(from: source, in: transaction)
|
||||
}
|
||||
|
||||
@available(*, obsoleted: 3.1, renamed: "didInsert(from:in:)")
|
||||
func didInsertFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) throws {
|
||||
@available(swift, obsoleted: 3.1, renamed: "didInsert(from:in:)")
|
||||
public func didInsertFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) throws {
|
||||
|
||||
try self.didInsert(from: source, in: transaction)
|
||||
}
|
||||
|
||||
@available(*, obsoleted: 3.1, renamed: "update(from:in:)")
|
||||
func updateFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) throws {
|
||||
@available(swift, obsoleted: 3.1, renamed: "update(from:in:)")
|
||||
public func updateFromImportSource(_ source: ImportSource, inTransaction transaction: BaseDataTransaction) throws {
|
||||
|
||||
try self.update(from: source, in: transaction)
|
||||
}
|
||||
|
||||
@@ -32,22 +32,22 @@ import CoreData
|
||||
/**
|
||||
A storage interface backed by an SQLite database that was created before CoreStore 2.0.0.
|
||||
*/
|
||||
@available(*, obsoleted: 3.1, message: "`LegacySQLiteStore` previous users should now use `SQLiteStore`'s new SQLiteStore.legacy(fileName:configuration:migrationMappingProviders:localStorageOptions:) or SQLiteStore.legacy() methods to create an `SQLiteStore` with legacy paths.")
|
||||
@available(swift, obsoleted: 3.1, message: "`LegacySQLiteStore` previous users should now use `SQLiteStore`'s new SQLiteStore.legacy(fileName:configuration:migrationMappingProviders:localStorageOptions:) or SQLiteStore.legacy() methods to create an `SQLiteStore` with legacy paths.")
|
||||
public final class LegacySQLiteStore: LocalStorage {
|
||||
|
||||
@available(*, obsoleted: 3.1, message: "Use `SQLiteStore`'s new SQLiteStore.init(fileURL:configuration:migrationMappingProviders:localStorageOptions:) initializer.")
|
||||
@available(swift, obsoleted: 3.1, message: "Use `SQLiteStore`'s new SQLiteStore.init(fileURL:configuration:migrationMappingProviders:localStorageOptions:) initializer.")
|
||||
public init(fileURL: URL, configuration: ModelConfiguration = nil, mappingModelBundles: [Bundle] = Bundle.allBundles, localStorageOptions: LocalStorageOptions = nil) {
|
||||
|
||||
fatalError()
|
||||
}
|
||||
|
||||
@available(*, obsoleted: 3.1, message: "Use `SQLiteStore`'s new SQLiteStore.legacy(fileName:configuration:migrationMappingProviders:localStorageOptions:) factory method.")
|
||||
@available(swift, obsoleted: 3.1, message: "Use `SQLiteStore`'s new SQLiteStore.legacy(fileName:configuration:migrationMappingProviders:localStorageOptions:) factory method.")
|
||||
public init(fileName: String, configuration: ModelConfiguration = nil, mappingModelBundles: [Bundle] = Bundle.allBundles, localStorageOptions: LocalStorageOptions = nil) {
|
||||
|
||||
fatalError()
|
||||
}
|
||||
|
||||
@available(*, obsoleted: 3.1, message: "Use `SQLiteStore`'s new SQLiteStore.legacy(...) factory method.")
|
||||
@available(swift, obsoleted: 3.1, message: "Use `SQLiteStore`'s new SQLiteStore.legacy(...) factory method.")
|
||||
public init() {
|
||||
|
||||
fatalError()
|
||||
|
||||
@@ -1453,7 +1453,7 @@ extension ListMonitor: FetchedResultsControllerHandler {
|
||||
// MARK: - Notification Keys
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
fileprivate extension Notification.Name {
|
||||
extension Notification.Name {
|
||||
|
||||
fileprivate static let listMonitorWillChangeList = Notification.Name(rawValue: "listMonitorWillChangeList")
|
||||
fileprivate static let listMonitorDidChangeList = Notification.Name(rawValue: "listMonitorDidChangeList")
|
||||
|
||||
@@ -83,7 +83,7 @@ public protocol ListObserver: class {
|
||||
// MARK: - ListObserver (Default Implementations)
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension ListObserver {
|
||||
extension ListObserver {
|
||||
|
||||
public func listMonitorWillChange(_ monitor: ListMonitor<ListEntityType>) { }
|
||||
|
||||
@@ -152,7 +152,7 @@ public protocol ListObjectObserver: ListObserver {
|
||||
// MARK: - ListObjectObserver (Default Implementations)
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension ListObjectObserver {
|
||||
extension ListObjectObserver {
|
||||
|
||||
public func listMonitor(_ monitor: ListMonitor<ListEntityType>, didInsertObject object: ListEntityType, toIndexPath indexPath: IndexPath) { }
|
||||
|
||||
@@ -205,7 +205,7 @@ public protocol ListSectionObserver: ListObjectObserver {
|
||||
// MARK: - ListSectionObserver (Default Implementations)
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension ListSectionObserver {
|
||||
extension ListSectionObserver {
|
||||
|
||||
public func listMonitor(_ monitor: ListMonitor<ListEntityType>, didInsertSection sectionInfo: NSFetchedResultsSectionInfo, toSectionIndex sectionIndex: Int) { }
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import Foundation
|
||||
|
||||
// MARK: - NSEntityDescription
|
||||
|
||||
internal extension NSEntityDescription {
|
||||
extension NSEntityDescription {
|
||||
|
||||
@nonobjc
|
||||
internal var dynamicObjectType: DynamicObject.Type? {
|
||||
|
||||
@@ -29,7 +29,7 @@ import Foundation
|
||||
|
||||
// MARK: - NSEntityDescription
|
||||
|
||||
internal extension NSEntityDescription {
|
||||
extension NSEntityDescription {
|
||||
|
||||
@nonobjc
|
||||
internal func cs_resolveAttributeNames() -> [String: (attribute: NSAttributeDescription, versionHash: Data)] {
|
||||
|
||||
@@ -30,7 +30,7 @@ import CoreData
|
||||
// MARK: - DataStack
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension DataStack {
|
||||
extension DataStack {
|
||||
|
||||
/**
|
||||
Utility for creating an `NSFetchedResultsController` from the `DataStack`. This is useful when an `NSFetchedResultsController` is preferred over the overhead of `ListMonitor`s abstraction.
|
||||
@@ -115,7 +115,7 @@ public extension DataStack {
|
||||
// MARK: - UnsafeDataTransaction
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension UnsafeDataTransaction {
|
||||
extension UnsafeDataTransaction {
|
||||
|
||||
/**
|
||||
Utility for creating an `NSFetchedResultsController` from the `UnsafeDataTransaction`. This is useful when an `NSFetchedResultsController` is preferred over the overhead of `ListMonitor`s abstraction.
|
||||
|
||||
@@ -30,7 +30,7 @@ import CoreData
|
||||
// MARK: - CSDataStack
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension CSDataStack {
|
||||
extension CSDataStack {
|
||||
|
||||
@available(*, deprecated, message: "CoreStore will obsolete NSFetchedResultsController support in the future in favor of CSListMonitor")
|
||||
@objc
|
||||
@@ -49,7 +49,7 @@ public extension CSDataStack {
|
||||
// MARK: - CSUnsafeDataTransaction
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension CSUnsafeDataTransaction {
|
||||
extension CSUnsafeDataTransaction {
|
||||
|
||||
@available(*, deprecated, message: "CoreStore will obsolete NSFetchedResultsController support in the future in favor of CSListMonitor")
|
||||
@objc
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSManagedObject
|
||||
|
||||
public extension NSManagedObject {
|
||||
extension NSManagedObject {
|
||||
|
||||
/**
|
||||
Exposes a `FetchableSource` that can fetch sibling objects of this `NSManagedObject` instance. This may be the `DataStack`, a `BaseDataTransaction`, the `NSManagedObjectContext` itself, or `nil` if the obejct's parent is already deallocated.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSManagedObject
|
||||
|
||||
internal extension NSManagedObject {
|
||||
extension NSManagedObject {
|
||||
|
||||
@nonobjc
|
||||
internal weak var coreStoreObject: CoreStoreObject? {
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSManagedObject
|
||||
|
||||
internal extension NSManagedObject {
|
||||
extension NSManagedObject {
|
||||
|
||||
@nonobjc
|
||||
internal func isRunningInAllowedQueue() -> Bool? {
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSManagedObject
|
||||
|
||||
public extension NSManagedObject {
|
||||
extension NSManagedObject {
|
||||
|
||||
/**
|
||||
Provides a convenience wrapper for accessing `-primitiveValueForKey:` with proper calls to `-willAccessValueForKey:` and `-didAccessValueForKey:`. This is useful when implementing accessor methods for transient attributes.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSManagedObject
|
||||
|
||||
public extension NSManagedObject {
|
||||
extension NSManagedObject {
|
||||
|
||||
/**
|
||||
Returns this object's parent `UnsafeDataTransaction` instance if it was created from one. Returns `nil` if the parent transaction is either an `AsynchronousDataTransaction` or a `SynchronousDataTransaction`, or if the object is not managed by CoreStore.
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSManagedObjectContext
|
||||
|
||||
internal extension NSManagedObjectContext {
|
||||
extension NSManagedObjectContext {
|
||||
|
||||
// MARK: Internal
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSManagedObjectContext
|
||||
|
||||
internal extension NSManagedObjectContext {
|
||||
extension NSManagedObjectContext {
|
||||
|
||||
// MARK: Internal
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@ extension NSManagedObjectContext: FetchableSource, QueryableSource {
|
||||
|
||||
// MARK: - NSManagedObjectContext (Internal)
|
||||
|
||||
internal extension NSManagedObjectContext {
|
||||
extension NSManagedObjectContext {
|
||||
|
||||
// MARK: Fetching
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSManagedObjectContext
|
||||
|
||||
internal extension NSManagedObjectContext {
|
||||
extension NSManagedObjectContext {
|
||||
|
||||
// MARK: Internal
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSManagedObjectContext
|
||||
|
||||
internal extension NSManagedObjectContext {
|
||||
extension NSManagedObjectContext {
|
||||
|
||||
// MARK: Internal
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import Foundation
|
||||
|
||||
// MARK: - FilePrivate
|
||||
|
||||
internal extension NSManagedObjectModel {
|
||||
extension NSManagedObjectModel {
|
||||
|
||||
@nonobjc
|
||||
internal func cs_resolveNames() -> [String: (entity: NSEntityDescription, versionHash: Data)] {
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSPersistentStore
|
||||
|
||||
internal extension NSPersistentStore {
|
||||
extension NSPersistentStore {
|
||||
|
||||
// MARK: Internal
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import CoreData
|
||||
|
||||
// MARK: - NSPersistentStoreCoordinator
|
||||
|
||||
internal extension NSPersistentStoreCoordinator {
|
||||
extension NSPersistentStoreCoordinator {
|
||||
|
||||
@nonobjc
|
||||
internal func performAsynchronously(_ closure: @escaping () -> Void) {
|
||||
|
||||
@@ -385,7 +385,7 @@ extension ObjectMonitor: FetchedResultsControllerHandler {
|
||||
// MARK: - Notification.Name
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
fileprivate extension Notification.Name {
|
||||
extension Notification.Name {
|
||||
|
||||
fileprivate static let objectMonitorWillChangeObject = Notification.Name(rawValue: "objectMonitorWillChangeObject")
|
||||
fileprivate static let objectMonitorDidDeleteObject = Notification.Name(rawValue: "objectMonitorDidDeleteObject")
|
||||
|
||||
@@ -77,7 +77,7 @@ public protocol ObjectObserver: class {
|
||||
// MARK: - ObjectObserver (Default Implementations)
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension ObjectObserver {
|
||||
extension ObjectObserver {
|
||||
|
||||
public func objectMonitor(_ monitor: ObjectMonitor<ObjectEntityType>, willUpdateObject object: ObjectEntityType) { }
|
||||
|
||||
|
||||
@@ -257,7 +257,10 @@ public struct OrderBy<D: DynamicObject>: OrderByClause, FetchClause, QueryClause
|
||||
}
|
||||
}
|
||||
|
||||
public extension OrderBy.SortKey where D: CoreStoreObject {
|
||||
|
||||
// MARK: - OrderBy.SortKey where D: CoreStoreObject
|
||||
|
||||
extension OrderBy.SortKey where D: CoreStoreObject {
|
||||
|
||||
/**
|
||||
Indicates that the `KeyPathString` should be sorted in ascending order
|
||||
@@ -298,7 +301,7 @@ public protocol OrderByClause {
|
||||
|
||||
// MARK: - Sequence where Iterator.Element: OrderByClause
|
||||
|
||||
public extension Sequence where Iterator.Element: OrderByClause {
|
||||
extension Sequence where Iterator.Element: OrderByClause {
|
||||
|
||||
/**
|
||||
Combines multiple `OrderBy` predicates together
|
||||
|
||||
@@ -28,7 +28,7 @@ import Foundation
|
||||
|
||||
// MARK: - Progress
|
||||
|
||||
public extension Progress {
|
||||
extension Progress {
|
||||
|
||||
/**
|
||||
Sets a closure that the `Progress` calls whenever its `fractionCompleted` changes. You can use this instead of setting up KVO.
|
||||
|
||||
@@ -28,7 +28,7 @@ import Foundation
|
||||
|
||||
// MARK: - Progress
|
||||
|
||||
public extension Progress {
|
||||
extension Progress {
|
||||
|
||||
/**
|
||||
Sets a closure that the `NSProgress` calls whenever its `fractionCompleted` changes. You can use this instead of setting up KVO.
|
||||
@@ -36,7 +36,7 @@ public extension Progress {
|
||||
- parameter closure: the closure to execute on progress change
|
||||
*/
|
||||
@objc
|
||||
public func cs_setProgressHandler(_ closure: ((_ progress: Progress) -> Void)?) {
|
||||
dynamic public func cs_setProgressHandler(_ closure: ((_ progress: Progress) -> Void)?) {
|
||||
|
||||
self.setProgressHandler(closure)
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import Foundation
|
||||
|
||||
// MARK: - DynamicObject
|
||||
|
||||
public extension DynamicObject where Self: CoreStoreObject {
|
||||
extension DynamicObject where Self: CoreStoreObject {
|
||||
|
||||
/**
|
||||
The containing type for relationships. `Relationship`s can be any `CoreStoreObject` subclass.
|
||||
|
||||
@@ -356,13 +356,13 @@ public final class SQLiteStore: LocalStorage {
|
||||
|
||||
// MARK: Obsoleted
|
||||
|
||||
@available(*, obsoleted: 3.1, message: "The `mappingModelBundles` argument of this method is ignored. Use the new SQLiteStore.init(fileURL:configuration:migrationMappingProviders:localStorageOptions:) initializer instead.")
|
||||
@available(swift, obsoleted: 3.1, message: "The `mappingModelBundles` argument of this method is ignored. Use the new SQLiteStore.init(fileURL:configuration:migrationMappingProviders:localStorageOptions:) initializer instead.")
|
||||
public convenience init(fileURL: URL, configuration: ModelConfiguration = nil, mappingModelBundles: [Bundle], localStorageOptions: LocalStorageOptions = nil) {
|
||||
|
||||
fatalError()
|
||||
}
|
||||
|
||||
@available(*, obsoleted: 3.1, message: "The `mappingModelBundles` argument of this method is ignored. Use the new SQLiteStore.init(fileName:configuration:migrationMappingProviders:localStorageOptions:) initializer instead.")
|
||||
@available(swift, obsoleted: 3.1, message: "The `mappingModelBundles` argument of this method is ignored. Use the new SQLiteStore.init(fileName:configuration:migrationMappingProviders:localStorageOptions:) initializer instead.")
|
||||
public convenience init(fileName: String, configuration: ModelConfiguration = nil, mappingModelBundles: [Bundle], localStorageOptions: LocalStorageOptions = nil) {
|
||||
|
||||
fatalError()
|
||||
|
||||
@@ -73,7 +73,7 @@ public struct SectionBy<D: DynamicObject> {
|
||||
}
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension SectionBy where D: NSManagedObject {
|
||||
extension SectionBy where D: NSManagedObject {
|
||||
|
||||
/**
|
||||
Initializes a `SectionBy` clause with the key path to use to group `ListMonitor` objects into sections
|
||||
@@ -99,7 +99,7 @@ public extension SectionBy where D: NSManagedObject {
|
||||
}
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension SectionBy where D: CoreStoreObject {
|
||||
extension SectionBy where D: CoreStoreObject {
|
||||
|
||||
/**
|
||||
Initializes a `SectionBy` clause with the key path to use to group `ListMonitor` objects into sections
|
||||
|
||||
@@ -808,7 +808,7 @@ public struct Select<D: DynamicObject, T: SelectResultType>: SelectClause, Hasha
|
||||
}
|
||||
}
|
||||
|
||||
public extension Select where T: NSManagedObjectID {
|
||||
extension Select where T: NSManagedObjectID {
|
||||
|
||||
/**
|
||||
Initializes a `Select` that queries for `NSManagedObjectID` results
|
||||
@@ -819,7 +819,7 @@ public extension Select where T: NSManagedObjectID {
|
||||
}
|
||||
}
|
||||
|
||||
public extension Select where D: NSManagedObject {
|
||||
extension Select where D: NSManagedObject {
|
||||
|
||||
/**
|
||||
Initializes a `Select` that queries the value of an attribute pertained by a keyPath
|
||||
@@ -831,7 +831,7 @@ public extension Select where D: NSManagedObject {
|
||||
}
|
||||
}
|
||||
|
||||
public extension Select where D: CoreStoreObject, T: ImportableAttributeType {
|
||||
extension Select where D: CoreStoreObject, T: ImportableAttributeType {
|
||||
|
||||
/**
|
||||
Initializes a `Select` that queries the value of an attribute pertained by a keyPath
|
||||
@@ -852,7 +852,7 @@ public extension Select where D: CoreStoreObject, T: ImportableAttributeType {
|
||||
}
|
||||
}
|
||||
|
||||
public extension Select where D: CoreStoreObject, T: ImportableAttributeType & NSCoding & NSCopying {
|
||||
extension Select where D: CoreStoreObject, T: ImportableAttributeType & NSCoding & NSCopying {
|
||||
|
||||
/**
|
||||
Initializes a `Select` that queries the value of an attribute pertained by a keyPath
|
||||
|
||||
@@ -152,7 +152,7 @@ public protocol LocalStorage: StorageInterface {
|
||||
func cs_eraseStorageAndWait(metadata: [String: Any], soureModelHint: NSManagedObjectModel?) throws
|
||||
}
|
||||
|
||||
internal extension LocalStorage {
|
||||
extension LocalStorage {
|
||||
|
||||
internal func matchesPersistentStore(_ persistentStore: NSPersistentStore) -> Bool {
|
||||
|
||||
@@ -239,7 +239,7 @@ public protocol CloudStorage: StorageInterface {
|
||||
|
||||
// MARK: - Internal
|
||||
|
||||
internal extension CloudStorage {
|
||||
extension CloudStorage {
|
||||
|
||||
internal func matchesPersistentStore(_ persistentStore: NSPersistentStore) -> Bool {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import Foundation
|
||||
|
||||
// MARK: - DynamicObject
|
||||
|
||||
public extension DynamicObject where Self: CoreStoreObject {
|
||||
extension DynamicObject where Self: CoreStoreObject {
|
||||
|
||||
/**
|
||||
The containing type for transformable properties. `Transformable` properties support types that conforms to `NSCoding & NSCopying`.
|
||||
|
||||
@@ -30,7 +30,7 @@ import CoreData
|
||||
// MARK: - UnsafeDataTransaction
|
||||
|
||||
@available(macOS 10.12, *)
|
||||
public extension UnsafeDataTransaction {
|
||||
extension UnsafeDataTransaction {
|
||||
|
||||
/**
|
||||
Creates a `ObjectMonitor` for the specified `DynamicObject`. Multiple `ObjectObserver`s may then register themselves to be notified when changes are made to the `DynamicObject`.
|
||||
|
||||
@@ -29,7 +29,7 @@ import Foundation
|
||||
|
||||
// MARK: - DynamicObject
|
||||
|
||||
public extension DynamicObject where Self: CoreStoreObject {
|
||||
extension DynamicObject where Self: CoreStoreObject {
|
||||
|
||||
/**
|
||||
The containing type for value propertiess. `Value` properties support any type that conforms to `ImportableAttributeType`.
|
||||
|
||||
@@ -45,7 +45,7 @@ public struct Where<D: DynamicObject>: WhereClauseType, FetchClause, QueryClause
|
||||
|
||||
return Where<D>(NSCompoundPredicate(type: .and, subpredicates: [left.predicate, right.predicate]))
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Combines two `Where` predicates together using `OR` operator
|
||||
*/
|
||||
@@ -307,7 +307,7 @@ public struct Where<D: DynamicObject>: WhereClauseType, FetchClause, QueryClause
|
||||
|
||||
// MARK: - Where where D: NSManagedObject
|
||||
|
||||
public extension Where where D: NSManagedObject {
|
||||
extension Where where D: NSManagedObject {
|
||||
|
||||
/**
|
||||
Initializes a `Where` clause that compares equality to `nil`
|
||||
@@ -401,7 +401,7 @@ public extension Where where D: NSManagedObject {
|
||||
|
||||
// MARK: - Where where D: CoreStoreObject
|
||||
|
||||
public extension Where where D: CoreStoreObject {
|
||||
extension Where where D: CoreStoreObject {
|
||||
|
||||
/**
|
||||
Initializes a `Where` clause that compares equality to `nil`
|
||||
@@ -527,7 +527,7 @@ public extension Where where D: CoreStoreObject {
|
||||
|
||||
// MARK: - Sequence where Iterator.Element: WhereClauseType
|
||||
|
||||
public extension Sequence where Iterator.Element: WhereClauseType {
|
||||
extension Sequence where Iterator.Element: WhereClauseType {
|
||||
|
||||
/**
|
||||
Combines multiple `Where` predicates together using `AND` operator
|
||||
@@ -549,7 +549,7 @@ public extension Sequence where Iterator.Element: WhereClauseType {
|
||||
|
||||
// MARK: - Deprecated
|
||||
|
||||
public extension Where {
|
||||
extension Where {
|
||||
|
||||
@available(*, deprecated, renamed: "&&?")
|
||||
public static func && (left: Where<D>, right: Where<D>?) -> Where<D> {
|
||||
|
||||
@@ -39,7 +39,7 @@ public protocol WhereClauseType: AnyWhereClause {
|
||||
associatedtype ObjectType: DynamicObject
|
||||
}
|
||||
|
||||
public extension WhereClauseType {
|
||||
extension WhereClauseType where Self.ObjectType: CoreStoreObject {
|
||||
|
||||
/**
|
||||
Combines two `Where` predicates together using `AND` operator.
|
||||
|
||||
Reference in New Issue
Block a user