PersistenceStore

public protocol PersistenceStore

Protocol for persistence stores used by SynchronizationManager

  • Create a new object of the given type.

    Throws

    If a invalid type was specified

    Declaration

    Swift

    func create<T>(type: Any.Type) throws -> T

    Parameters

    type

    The type of which a new object should be created

    Return Value

    A newly created object of the given type

  • Delete objects of the given type which also match the predicate.

    Throws

    If an invalid type was specified

    Declaration

    Swift

    func delete(type: Any.Type, predicate: NSPredicate) throws

    Parameters

    type

    The type of which objects should be deleted

    predicate

    The predicate used for matching objects to delete

  • Fetches all objects of a specific type which also match the predicate.

    Throws

    If an invalid type was specified

    Declaration

    Swift

    func fetchAll<T>(type: Any.Type, predicate: NSPredicate) throws -> [T]

    Parameters

    type

    The type of which objects should be fetched

    predicate

    The predicate used for matching object to fetch

    Return Value

    An array of matching objects

  • Returns an array of names of properties the given type stores persistently.

    This should omit any properties returned by relationshipsFor(type:).

    Throws

    If an invalid type was specified

    Declaration

    Swift

    func properties(for type: Any.Type) throws -> [String]

    Parameters

    type

    The type of which properties should be returned for

    Return Value

    An array of property names

  • Returns an array of names of properties for any relationship the given type stores persistently.

    Throws

    If an invalid type was specified

    Declaration

    Swift

    func relationships(for type: Any.Type) throws -> [String]

    Parameters

    type

    The type of which properties should be returned for

    Return Value

    An array of property names

  • Performs the actual save to the persistence store.

    Throws

    If any error occured during the save operation

    Declaration

    Swift

    func save() throws
  • Undocumented

    Declaration

    Swift

    public protocol PersistenceStore
  • Undocumented

    Declaration

    Swift

    public protocol PersistenceStore