Deprecated rollback() on async and sync transactions. Added undo utilities to unsafe transactions.

This commit is contained in:
John Rommel Estropia
2015-11-14 20:00:40 +09:00
parent 05b4a7092a
commit 0c0a2a382c
5 changed files with 44 additions and 23 deletions

View File

@@ -55,6 +55,30 @@ public final class UnsafeDataTransaction: BaseDataTransaction {
}
}
/**
Rolls back the transaction.
*/
public func rollback() {
self.context.rollback()
}
/**
Undo's the last change made to the transaction.
*/
public func undo() {
self.context.undo()
}
/**
Redo's the last undone change to the transaction.
*/
public func redo() {
self.context.redo()
}
/**
Begins a child transaction where `NSManagedObject` creates, updates, and deletes can be made. This is useful for making temporary changes, such as partially filled forms.