DITWriteTransaction
@interface DITWriteTransaction : NSObject
Exposes functionality that allows you to perform multiple operations on the store within a single write transaction.
You must use the scoped method to get collection-scoped access to the write transaction object,
which will then allow you to perform insert, update, remove or evict operations using the write
transaction.
-
Creates a
DITScopedWriteTransactionobject that will ensure that operations called on it are all in the context of the collection name provided.You can create many
DITScopedWriteTransactionobjects perDITWriteTransactionobject.Declaration
Objective-C
- (nonnull DITScopedWriteTransaction *)scopedToCollectionNamed: (nonnull NSString *)collectionName;Parameters
collectionNameThe name of the collection that the write transaction object should be scoped to.
Return Value
A
DITScopedWriteTransactionthat is scoped to the specified collection. -
Returns a reference to a
DITScopedWriteTransactionobject that will ensure that operations called on it are all in the context of the collection name provided.You can create many
DITScopedWriteTransactionobjects perDITWriteTransactionobject.Declaration
Objective-C
- (nonnull DITScopedWriteTransaction *)objectForKeyedSubscript: (nonnull NSString *)collectionName;Parameters
collectionNameThe name of the collection that the write transaction object should be scoped to.
Return Value
Returns a
DITScopedWriteTransaction
DITWriteTransaction Class Reference