mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-16 22:16:53 +01:00
minor changes, updated README
This commit is contained in:
@@ -27,12 +27,6 @@ import CoreData
|
||||
import GCDKit
|
||||
|
||||
|
||||
/**
|
||||
Okay, okay. This one's shorter.
|
||||
*/
|
||||
public typealias HCD = CoreStore
|
||||
|
||||
|
||||
// MARK: - CoreStore
|
||||
|
||||
/**
|
||||
|
||||
@@ -46,22 +46,22 @@ public struct From<T: NSManagedObject> {
|
||||
self.findPersistentStores = { _ in nil }
|
||||
}
|
||||
|
||||
public init(_ configurations: String...) {
|
||||
public init(_ configurations: String?...) {
|
||||
|
||||
self.init(configurations: configurations)
|
||||
}
|
||||
|
||||
public init(_ configurations: [String]) {
|
||||
public init(_ configurations: [String?]) {
|
||||
|
||||
self.init(configurations: configurations)
|
||||
}
|
||||
|
||||
public init(_ entity: T.Type, _ configurations: String...) {
|
||||
public init(_ entity: T.Type, _ configurations: String?...) {
|
||||
|
||||
self.init(configurations: configurations)
|
||||
}
|
||||
|
||||
public init(_ entity: T.Type, _ configurations: [String]) {
|
||||
public init(_ entity: T.Type, _ configurations: [String?]) {
|
||||
|
||||
self.init(configurations: configurations)
|
||||
}
|
||||
@@ -120,9 +120,9 @@ public struct From<T: NSManagedObject> {
|
||||
|
||||
private let findPersistentStores: (context: NSManagedObjectContext) -> [NSPersistentStore]?
|
||||
|
||||
private init(configurations: [String]) {
|
||||
private init(configurations: [String?]) {
|
||||
|
||||
let configurationsSet = Set(configurations)
|
||||
let configurationsSet = Set(configurations.map { $0 ?? Into.defaultConfigurationName })
|
||||
self.findPersistentStores = { (context: NSManagedObjectContext) -> [NSPersistentStore]? in
|
||||
|
||||
return context.parentStack?.persistentStoresForEntityClass(T.self)?.filter {
|
||||
|
||||
@@ -31,6 +31,11 @@ public func +(left: OrderBy, right: OrderBy) -> OrderBy {
|
||||
return OrderBy(left.sortDescriptors + right.sortDescriptors)
|
||||
}
|
||||
|
||||
public func +=(inout left: OrderBy, right: OrderBy) {
|
||||
|
||||
left = left + right
|
||||
}
|
||||
|
||||
|
||||
// MARK: - KeyPath
|
||||
|
||||
|
||||
Reference in New Issue
Block a user