Releases: ffried/FFCoreData
Releases · ffried/FFCoreData
v6.4.0
v6.3.0
v6.2.0
v6.1.0
v6.0.0
v5.1.0
This release adds convenience APIs for fetching and creating Fetchable
and Creatable
Models using Swift KeyPaths and Operators.
E.g.:
final class MyModel: NSManagedObject, FindOrCreatable {
let hasContent: Bool
let validTo: Date?
}
let context = CoreDataStack.mainContext
let models = try MyModel.find(in: context, where: \.hasContent == true && \.validTo >= Date(), sortedBy: ^\.validTo)
let newModel = try MyModel.findOrCreate(in: context, where: \.hasContent != true)