Skip to content

Commit

Permalink
Renaming YapDatabaseExtension hook methods to match standard naming c…
Browse files Browse the repository at this point in the history
…onventions.
  • Loading branch information
robbiehanson committed Jun 17, 2016
1 parent 2e540c2 commit aaf9941
Show file tree
Hide file tree
Showing 15 changed files with 321 additions and 321 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ - (NSArray *)actionItemsForKey:(NSString *)key inCollection:(NSString *)collecti
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleUpdateObject:(id)object
forCollectionKey:(YapCollectionKey *)collectionKey
withMetadata:(id)metadata
rowid:(int64_t)rowid
- (void)didUpdateObject:(id)object
forCollectionKey:(YapCollectionKey *)collectionKey
withMetadata:(id)metadata
rowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand All @@ -75,14 +75,14 @@ - (void)handleUpdateObject:(id)object

[amConnection->actionItemsCache removeObjectForKey:collectionKey];

[super handleUpdateObject:object forCollectionKey:collectionKey withMetadata:metadata rowid:rowid];
[super didUpdateObject:object forCollectionKey:collectionKey withMetadata:metadata rowid:rowid];
}

/**
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleReplaceObject:(id)object forCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didReplaceObject:(id)object forCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand All @@ -91,7 +91,7 @@ - (void)handleReplaceObject:(id)object forCollectionKey:(YapCollectionKey *)coll

[amConnection->actionItemsCache removeObjectForKey:collectionKey];

[super handleReplaceObject:object forCollectionKey:collectionKey withRowid:rowid];
[super didReplaceObject:object forCollectionKey:collectionKey withRowid:rowid];
}

/**
Expand All @@ -101,7 +101,7 @@ - (void)handleReplaceObject:(id)object forCollectionKey:(YapCollectionKey *)coll
* Corresponds to the following method(s) in YapDatabaseReadWriteTransaction:
* - touchObjectForKey:inCollection:collection:
**/
- (void)handleTouchObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didTouchObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand All @@ -110,7 +110,7 @@ - (void)handleTouchObjectForCollectionKey:(YapCollectionKey *)collectionKey with

[amConnection->actionItemsCache removeObjectForKey:collectionKey];

[super handleTouchObjectForCollectionKey:collectionKey withRowid:rowid];
[super didTouchObjectForCollectionKey:collectionKey withRowid:rowid];
}

/**
Expand All @@ -120,7 +120,7 @@ - (void)handleTouchObjectForCollectionKey:(YapCollectionKey *)collectionKey with
* Corresponds to the following method(s) in YapDatabaseReadWriteTransaction:
* - touchRowForKey:inCollection:
**/
- (void)handleTouchRowForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didTouchRowForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand All @@ -129,14 +129,14 @@ - (void)handleTouchRowForCollectionKey:(YapCollectionKey *)collectionKey withRow

[amConnection->actionItemsCache removeObjectForKey:collectionKey];

[super handleTouchRowForCollectionKey:collectionKey withRowid:rowid];
[super didTouchRowForCollectionKey:collectionKey withRowid:rowid];
}

/**
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleRemoveObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didRemoveObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand All @@ -145,14 +145,14 @@ - (void)handleRemoveObjectForCollectionKey:(YapCollectionKey *)collectionKey wit

[amConnection->actionItemsCache removeObjectForKey:collectionKey];

[super handleRemoveObjectForCollectionKey:collectionKey withRowid:rowid];
[super didRemoveObjectForCollectionKey:collectionKey withRowid:rowid];
}

/**
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleRemoveObjectsForKeys:(NSArray *)keys inCollection:(NSString *)collection withRowids:(NSArray *)rowids
- (void)didRemoveObjectsForKeys:(NSArray *)keys inCollection:(NSString *)collection withRowids:(NSArray *)rowids
{
YDBLogAutoTrace();

Expand All @@ -164,14 +164,14 @@ - (void)handleRemoveObjectsForKeys:(NSArray *)keys inCollection:(NSString *)coll
[amConnection->actionItemsCache removeObjectForKey:YapCollectionKeyCreate(collection, key)];
}

[super handleRemoveObjectsForKeys:keys inCollection:collection withRowids:rowids];
[super didRemoveObjectsForKeys:keys inCollection:collection withRowids:rowids];
}

/**
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleRemoveAllObjectsInAllCollections
- (void)didRemoveAllObjectsInAllCollections
{
YDBLogAutoTrace();

Expand All @@ -180,7 +180,7 @@ - (void)handleRemoveAllObjectsInAllCollections

[amConnection->actionItemsCache removeAllObjects];

[super handleRemoveAllObjectsInAllCollections];
[super didRemoveAllObjectsInAllCollections];
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
34 changes: 17 additions & 17 deletions YapDatabase/Extensions/AutoView/YapDatabaseAutoViewTransaction.m
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ - (void)repopulateView
//
// We could simply run the usual algorithm.
// That is, enumerate over every item in the database, and run pretty much the same code as
// in the handleUpdateObject:forCollectionKey:withMetadata:rowid:.
// in the didUpdateObject:forCollectionKey:withMetadata:rowid:.
// However, this causes a potential issue where the sortingBlock will be invoked with items that
// no longer exist in the given group.
//
Expand Down Expand Up @@ -874,10 +874,10 @@ - (void)_handleChangeWithRowid:(int64_t)rowid
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleInsertObject:(id)object
forCollectionKey:(YapCollectionKey *)collectionKey
withMetadata:(id)metadata
rowid:(int64_t)rowid
- (void)didInsertObject:(id)object
forCollectionKey:(YapCollectionKey *)collectionKey
withMetadata:(id)metadata
rowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -907,10 +907,10 @@ - (void)handleInsertObject:(id)object
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleUpdateObject:(id)object
forCollectionKey:(YapCollectionKey *)collectionKey
withMetadata:(id)metadata
rowid:(int64_t)rowid
- (void)didUpdateObject:(id)object
forCollectionKey:(YapCollectionKey *)collectionKey
withMetadata:(id)metadata
rowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -941,7 +941,7 @@ - (void)handleUpdateObject:(id)object
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleReplaceObject:(id)object forCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didReplaceObject:(id)object forCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -983,7 +983,7 @@ - (void)handleReplaceObject:(id)object forCollectionKey:(YapCollectionKey *)coll
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleReplaceMetadata:(id)metadata forCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didReplaceMetadata:(id)metadata forCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -1028,7 +1028,7 @@ - (void)handleReplaceMetadata:(id)metadata forCollectionKey:(YapCollectionKey *)
* Corresponds to the following method(s) in YapDatabaseReadWriteTransaction:
* - touchObjectForKey:inCollection:collection:
**/
- (void)handleTouchObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didTouchObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -1082,7 +1082,7 @@ - (void)handleTouchObjectForCollectionKey:(YapCollectionKey *)collectionKey with
* Corresponds to the following method(s) in YapDatabaseReadWriteTransaction:
* - touchMetadataForKey:inCollection:
**/
- (void)handleTouchMetadataForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didTouchMetadataForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -1136,7 +1136,7 @@ - (void)handleTouchMetadataForCollectionKey:(YapCollectionKey *)collectionKey wi
* Corresponds to the following method(s) in YapDatabaseReadWriteTransaction:
* - touchRowForKey:inCollection:
**/
- (void)handleTouchRowForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didTouchRowForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -1188,7 +1188,7 @@ - (void)handleTouchRowForCollectionKey:(YapCollectionKey *)collectionKey withRow
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleRemoveObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didRemoveObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand All @@ -1209,7 +1209,7 @@ - (void)handleRemoveObjectForCollectionKey:(YapCollectionKey *)collectionKey wit
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleRemoveObjectsForKeys:(NSArray *)keys inCollection:(NSString *)collection withRowids:(NSArray *)rowids
- (void)didRemoveObjectsForKeys:(NSArray *)keys inCollection:(NSString *)collection withRowids:(NSArray *)rowids
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -1241,7 +1241,7 @@ - (void)handleRemoveObjectsForKeys:(NSArray *)keys inCollection:(NSString *)coll
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleRemoveAllObjectsInAllCollections
- (void)didRemoveAllObjectsInAllCollections
{
YDBLogAutoTrace();

Expand Down
40 changes: 20 additions & 20 deletions YapDatabase/Extensions/CloudKit/YapDatabaseCloudKitTransaction.m
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ - (void)processRecord:(CKRecord *)record recordInfo:(YDBCKRecordInfo *)recordInf
}

/**
* This method is called from handleRemoveObjectsForKeys:inCollection:withRowids:.
* This method is called from didRemoveObjectsForKeys:inCollection:withRowids:.
*
* It's used to fetch all the mappingTableInfo items for all the given rowids.
* This information is used in order to determine which rowids are mapped to a CKRecords (in the record table).
Expand Down Expand Up @@ -1476,7 +1476,7 @@ - (NSDictionary *)mappingTableInfoForRowids:(NSArray *)rowids
sqlite3 *db = databaseTransaction->connection->db;

// Note:
// The handleRemoveObjectsForKeys:inCollection:withRowids: has the following guarantee:
// The didRemoveObjectsForKeys:inCollection:withRowids: has the following guarantee:
// count <= (SQLITE_LIMIT_VARIABLE_NUMBER - 1)
//
// So we don't have to worry about sqlite's upper bound on host parameters.
Expand Down Expand Up @@ -1864,7 +1864,7 @@ - (NSSet *)mappingTableRowidsForRecordTableHash:(NSString *)hash
}

/**
* This method is called from handleRemoveObjectsForKeys:inCollection:withRowids:.
* This method is called from didRemoveObjectsForKeys:inCollection:withRowids:.
*
* It's used to fetch all the recordInfo items for all the given rowids.
* This information is used in order to determine which rowids have associated CKRecords,
Expand Down Expand Up @@ -1927,7 +1927,7 @@ - (NSDictionary *)recordTableInfoForHashes:(NSArray *)hashes
sqlite3 *db = databaseTransaction->connection->db;

// Note:
// The handleRemoveObjectsForKeys:inCollection:withRowids: has the following guarantee:
// The didRemoveObjectsForKeys:inCollection:withRowids: has the following guarantee:
// count <= (SQLITE_LIMIT_VARIABLE_NUMBER - 1)
//
// So we don't have to worry about sqlite's upper bound on host parameters.
Expand Down Expand Up @@ -3258,10 +3258,10 @@ - (void)_handleChangeWithRowid:(int64_t)rowid
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleInsertObject:(id)object
forCollectionKey:(YapCollectionKey *)collectionKey
withMetadata:(id)metadata
rowid:(int64_t)rowid
- (void)didInsertObject:(id)object
forCollectionKey:(YapCollectionKey *)collectionKey
withMetadata:(id)metadata
rowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -3304,10 +3304,10 @@ - (void)handleInsertObject:(id)object
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleUpdateObject:(id)object
forCollectionKey:(YapCollectionKey *)collectionKey
withMetadata:(id)metadata
rowid:(int64_t)rowid
- (void)didUpdateObject:(id)object
forCollectionKey:(YapCollectionKey *)collectionKey
withMetadata:(id)metadata
rowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -3342,7 +3342,7 @@ - (void)handleUpdateObject:(id)object
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleReplaceObject:(id)object forCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didReplaceObject:(id)object forCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -3382,7 +3382,7 @@ - (void)handleReplaceObject:(id)object forCollectionKey:(YapCollectionKey *)coll
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleReplaceMetadata:(id)metadata forCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didReplaceMetadata:(id)metadata forCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -3422,7 +3422,7 @@ - (void)handleReplaceMetadata:(id)metadata forCollectionKey:(YapCollectionKey *)
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleTouchObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didTouchObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
// Check for possible MidMerge

Expand Down Expand Up @@ -3466,7 +3466,7 @@ - (void)handleTouchObjectForCollectionKey:(YapCollectionKey *)collectionKey with
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleTouchMetadataForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didTouchMetadataForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
// Check for possible MidMerge

Expand Down Expand Up @@ -3510,7 +3510,7 @@ - (void)handleTouchMetadataForCollectionKey:(YapCollectionKey *)collectionKey wi
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleTouchRowForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didTouchRowForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
// Check for possible MidMerge

Expand Down Expand Up @@ -3555,7 +3555,7 @@ - (void)handleTouchRowForCollectionKey:(YapCollectionKey *)collectionKey withRow
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleRemoveObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
- (void)didRemoveObjectForCollectionKey:(YapCollectionKey *)collectionKey withRowid:(int64_t)rowid
{
YDBLogAutoTrace();

Expand All @@ -3581,7 +3581,7 @@ - (void)handleRemoveObjectForCollectionKey:(YapCollectionKey *)collectionKey wit
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleRemoveObjectsForKeys:(NSArray *)keys inCollection:(NSString *)collection withRowids:(NSArray *)rowids
- (void)didRemoveObjectsForKeys:(NSArray *)keys inCollection:(NSString *)collection withRowids:(NSArray *)rowids
{
YDBLogAutoTrace();

Expand Down Expand Up @@ -3623,7 +3623,7 @@ - (void)handleRemoveObjectsForKeys:(NSArray *)keys inCollection:(NSString *)coll
* YapDatabase extension hook.
* This method is invoked by a YapDatabaseReadWriteTransaction as a post-operation-hook.
**/
- (void)handleRemoveAllObjectsInAllCollections
- (void)didRemoveAllObjectsInAllCollections
{
YDBLogAutoTrace();

Expand Down
Loading

0 comments on commit aaf9941

Please sign in to comment.