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) throwsParameters
- block:
The closure to run before performing a save operation.