Class

NSIncrementalStore

NSIncrementalStore is an abstract superclass defining the API through which Core Data communicates with a store. This interface is designed to allow you to create persistent stores which load and save data incrementally, allowing for the management of large and/or shared datasets. See Incremental Store Programming Guide for an implementation strategy and best practices when implementing your own incremental store.

Overview

Subclassing Notes

Methods to Override

In a subclass of NSIncrementalStore, you must override the following methods to provide behavior appropriate for your store:

There is no need to override the methods that you must otherwise override for a subclass of NSPersistentStore.

Symbols

Required Methods

func loadMetadata()

Loads the metadata for the store.

func execute(NSPersistentStoreRequest, with: NSManagedObjectContext?)

Returns a value as appropriate for the given request, or nil if the request cannot be completed.

func newValuesForObject(with: NSManagedObjectID, with: NSManagedObjectContext)

Returns an incremental store node encapsulating the persistent external values of the object with a given object ID.

func newValue(forRelationship: NSRelationshipDescription, forObjectWith: NSManagedObjectID, with: NSManagedObjectContext?)

Returns the relationship for the given relationship of the object with a given object ID.

func obtainPermanentIDs(for: [NSManagedObject])

Returns an array containing the object IDs for a given array of newly-inserted objects.

Optional Methods

class func identifierForNewStore(at: URL)

Returns the identifier for the store at a given URL.

func managedObjectContextDidRegisterObjects(with: [NSManagedObjectID])

Indicates that objects identified by a given array of object IDs are in use in a managed object context.

func managedObjectContextDidUnregisterObjects(with: [NSManagedObjectID])

Indicates that objects identified by a given array of object IDs are no longer being used by a managed object context.

Methods That Should Not Be Overridden

func newObjectID(for: NSEntityDescription, referenceObject: Any)

Returns a new object ID that uses given data as the key.

func referenceObject(for: NSManagedObjectID)

Returns the reference data used to construct a given object ID.

Relationships

Inherits From