NSFetchRequestResult

Undocumented

  • Creates a new fetch request for the NSManagedObject entity.

    Declaration

    Swift

    static public func fetchRequestForEntity(inContext context: NSManagedObjectContext) -> NSFetchRequest<Self>
  • Fetches the first Entity that matches the optional predicate within the specified NSManagedObjectContext.

    Throws

    Any error produced from executeFetchRequest

    Declaration

    Swift

    static public func findFirstInContext(_ context: NSManagedObjectContext, predicate: NSPredicate? = nil) throws -> Self?
  • Fetches all Entities within the specified NSManagedObjectContext.

    Throws

    Any error produced from executeFetchRequest

    Declaration

    Swift

    static public func allInContext(_ context: NSManagedObjectContext, predicate: NSPredicate? = nil, sortDescriptors: [NSSortDescriptor]? = nil) throws -> [Self]
  • Returns count of Entities that matches the optional predicate within the specified NSManagedObjectContext.

    Throws

    Any error produced from countForFetchRequest

    Declaration

    Swift

    static public func countInContext(_ context: NSManagedObjectContext, predicate: NSPredicate? = nil) throws -> Int
  • Removes all entities from within the specified NSManagedObjectContext.

    Throws

    Any error produced from executeFetchRequest

    Declaration

    Swift

    static public func removeAllInContext(_ context: NSManagedObjectContext) throws
  • Removes all entities from within the specified NSManagedObjectContext excluding a supplied array of entities.

    Throws

    Any error produced from executeFetchRequest

    Declaration

    Swift

    static public func removeAllInContext(_ context: NSManagedObjectContext, except toKeep: [Self]) throws