2018-04-25 16:46:43 +02:00
|
|
|
//
|
|
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2020-11-11 06:30:54 +01:00
|
|
|
#import <SignalUtilitiesKit/OWSDatabaseMigration.h>
|
2018-04-25 16:46:43 +02:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
typedef BOOL (^DBRecordFilterBlock)(id record);
|
|
|
|
|
|
|
|
@class YapDatabaseConnection;
|
|
|
|
|
|
|
|
// Base class for migrations that resave all or a subset of
|
|
|
|
// records in a database collection.
|
|
|
|
@interface OWSResaveCollectionDBMigration : OWSDatabaseMigration
|
|
|
|
|
|
|
|
- (void)resaveDBCollection:(NSString *)collection
|
|
|
|
filter:(nullable DBRecordFilterBlock)filter
|
|
|
|
dbConnection:(YapDatabaseConnection *)dbConnection
|
|
|
|
completion:(OWSDatabaseMigrationCompletion)completion;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|