AsynchronousDataTransaction
public final class AsynchronousDataTransaction : BaseDataTransactionextension AsynchronousDataTransaction: CustomDebugStringConvertible, CoreStoreDebugStringConvertibleThe AsynchronousDataTransaction provides an interface for DynamicObject creates, updates, and deletes. A transaction object should typically be only used from within a transaction block initiated from DataStack.perform(asynchronous:...).
- 
                  
                  Cancels a transaction by throwing CoreStoreError.userCancelled.try transaction.cancel()Important Never usetry?ortry!on acancel()call. Always usetry. Usingtry?will swallow the cancellation and the transaction will proceed to commit as normal. Usingtry!will crash the app ascancel()will always throw an error.DeclarationSwift public func cancel() throws -> Never
- 
                  
                  The Resultcontains the success or failure information for a completed transaction.Result<T>.successindicates that the transaction succeeded, either because the save succeeded or because there were no changes to save. The associateduserInfois the value returned from the transaction closure.Result<T>.failureindicates that the transaction either failed or was cancelled. The associated object for this value is aCoreStoreErrorenum value.DeclarationSwift public typealias Result<UserInfoType> = Swift.Result<UserInfoType, CoreStoreError>
- 
                  
                  Creates a new NSManagedObjectorCoreStoreObjectwith the specified entity type.DeclarationSwift public override func create<O>(_ into: Into<O>) -> O where O : DynamicObjectParametersintothe Intoclause indicating the destinationNSManagedObjectorCoreStoreObjectentity type and the destination configurationReturn Valuea new NSManagedObjectorCoreStoreObjectinstance of the specified entity type.
- 
                  
                  Returns an editable proxy of a specified NSManagedObjectorCoreStoreObject.DeclarationSwift public override func edit<O>(_ object: O?) -> O? where O : DynamicObjectParametersobjectthe NSManagedObjectorCoreStoreObjectto be editedReturn Valuean editable proxy for the specified NSManagedObjectorCoreStoreObject.
- 
                  
                  Returns an editable proxy of the object with the specified NSManagedObjectID.DeclarationSwift public override func edit<O>(_ into: Into<O>, _ objectID: NSManagedObjectID) -> O? where O : DynamicObjectParametersintoan Intoclause specifying the entity typeobjectIDthe NSManagedObjectIDfor the object to be editedReturn Valuean editable proxy for the specified NSManagedObjectorCoreStoreObject.
- 
                  
                  Deletes the objects with the specified NSManagedObjectIDs.DeclarationSwift public override func delete<S>(objectIDs: S) where S : Sequence, S.Element : NSManagedObjectIDParametersobjectIDsthe NSManagedObjectIDs of the objects to delete
- 
                  
                  Deletes the specified NSManagedObjects orCoreStoreObjects represented by series ofObjectRepresentations.DeclarationSwift public override func delete<O>(_ object: O?, _ objects: O?...) where O : ObjectRepresentationParametersobjectthe ObjectRepresentationrepresenting anNSManagedObjectorCoreStoreObjectto be deletedobjectsother ObjectRepresentations representingNSManagedObjects orCoreStoreObjects to be deleted
- 
                  
                  Deletes the specified NSManagedObjects orCoreStoreObjects represented by anObjectRepresenation.DeclarationSwift public override func delete<S>(_ objects: S) where S : Sequence, S.Element : ObjectRepresentationParametersobjectsthe ObjectRepresenations representingNSManagedObjects orCoreStoreObjects to be deleted
- 
                  
                  DeclarationSwift public var debugDescription: String { get }
 View on GitHub
            View on GitHub
           AsynchronousDataTransaction Class Reference
      AsynchronousDataTransaction Class Reference