mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-04-18 06:59:42 +02:00
fix OSX compiler errors
This commit is contained in:
@@ -45,6 +45,7 @@ public protocol QueryChainableBuilderType {
|
|||||||
var queryClauses: [QueryClause] { get set }
|
var queryClauses: [QueryClause] { get set }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@available(OSX 10.12, *)
|
||||||
public protocol SectionMonitorBuilderType {
|
public protocol SectionMonitorBuilderType {
|
||||||
|
|
||||||
associatedtype ObjectType: DynamicObject
|
associatedtype ObjectType: DynamicObject
|
||||||
@@ -85,6 +86,7 @@ public struct QueryChainBuilder<D: DynamicObject, R: SelectResultType>: QueryCha
|
|||||||
|
|
||||||
// MARK: - SectionMonitorChainBuilder
|
// MARK: - SectionMonitorChainBuilder
|
||||||
|
|
||||||
|
@available(OSX 10.12, *)
|
||||||
public struct SectionMonitorChainBuilder<D: DynamicObject>: SectionMonitorBuilderType {
|
public struct SectionMonitorChainBuilder<D: DynamicObject>: SectionMonitorBuilderType {
|
||||||
|
|
||||||
// MARK: SectionMonitorBuilderType
|
// MARK: SectionMonitorBuilderType
|
||||||
@@ -113,11 +115,13 @@ public extension From {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@available(OSX 10.12, *)
|
||||||
public func sectionBy(_ sectionKeyPath: KeyPathString) -> SectionMonitorChainBuilder<D> {
|
public func sectionBy(_ sectionKeyPath: KeyPathString) -> SectionMonitorChainBuilder<D> {
|
||||||
|
|
||||||
return self.sectionBy(sectionKeyPath, { $0 })
|
return self.sectionBy(sectionKeyPath, { $0 })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@available(OSX 10.12, *)
|
||||||
public func sectionBy(_ sectionKeyPath: KeyPathString, _ sectionIndexTransformer: @escaping (_ sectionName: String?) -> String?) -> SectionMonitorChainBuilder<D> {
|
public func sectionBy(_ sectionKeyPath: KeyPathString, _ sectionIndexTransformer: @escaping (_ sectionName: String?) -> String?) -> SectionMonitorChainBuilder<D> {
|
||||||
|
|
||||||
return .init(
|
return .init(
|
||||||
@@ -270,6 +274,7 @@ public extension QueryChainBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@available(OSX 10.12, *)
|
||||||
public extension SectionMonitorChainBuilder {
|
public extension SectionMonitorChainBuilder {
|
||||||
|
|
||||||
public func `where`(_ clause: Where<D>) -> SectionMonitorChainBuilder<D> {
|
public func `where`(_ clause: Where<D>) -> SectionMonitorChainBuilder<D> {
|
||||||
|
|||||||
@@ -78,12 +78,7 @@ extension NSManagedObject: DynamicObject {
|
|||||||
|
|
||||||
public class func cs_fromRaw(object: NSManagedObject) -> Self {
|
public class func cs_fromRaw(object: NSManagedObject) -> Self {
|
||||||
|
|
||||||
@inline(__always)
|
return unsafeDowncast(object, to: self)
|
||||||
func forceCast<D: NSManagedObject>(_ value: Any) -> D {
|
|
||||||
|
|
||||||
return value as! D
|
|
||||||
}
|
|
||||||
return forceCast(object)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static func cs_matches(object: NSManagedObject) -> Bool {
|
public static func cs_matches(object: NSManagedObject) -> Bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user