Contents

transaction(block:)

Runs the provided closure, and once it finishes, writes any pending inserts, changes, and deletes to the persistent storage.

Declaration

func transaction(block: () throws -> Void) throws

Parameters

  • block:

    The closure to run before performing a save operation.

See Also

Persisting unsaved changes