vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.m in motion-yapper-0.0.1 vs vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.m in motion-yapper-0.0.2

- old
+ new

@@ -38,14 +38,32 @@ NSAssert(NO, @"Missing required override method(%@) in class(%@)", NSStringFromSelector(_cmd), [self class]); return NO; } /** + * Subclasses may OPTIONALLY implement this method. + * This method is only called if within a readwrite transaction. + * + * Subclasses should ONLY implement this method if they need to make changes to the 'database' table. + * That is, the main collection/key/value table that directly stores the user's objects. + * + * Return NO if the extension does not directly modify the main database table. + * Return YES if the extension does modify the main database table, + * regardless of whether it made changes during this invocation. + * + * This method may be invoked several times in a row. +**/ +- (BOOL)flushPendingChangesToMainDatabaseTable +{ + return NO; +} + +/** * This method is called if within a readwrite transaction. * This method is optional. **/ -- (void)preCommitReadWriteTransaction +- (void)prepareChangeset { // Subclasses may optionally override this method to perform any "cleanup" before the changesets are requested. // Remember, the changesets are requested before the commitTransaction method is invoked. } @@ -173,8 +191,14 @@ - (void)setDataValue:(NSData *)value forExtensionKey:(NSString *)key { NSString *registeredName = [[[self extensionConnection] extension] registeredName]; [[self databaseTransaction] setDataValue:value forKey:key extension:registeredName]; +} + +- (void)removeValueForExtensionKey:(NSString *)key +{ + NSString *registeredName = [[[self extensionConnection] extension] registeredName]; + [[self databaseTransaction] removeValueForKey:key extension:registeredName]; } @end