YapDatabaseViewFiltering
@interface YapDatabaseViewFiltering : NSObject
The filtering block removes items from this view that are in the parent view.
A YapDatabaseFilteredView will have the same groups and same sort order as the parent, with the exception of those groups/rows that the filter block returned NO for.
Here’s how it works: When you initialize a YapDatabaseFilteredView instance, it will enumerate the parentView and invoke the filter block for every row in every group. So it can quickly copy a parentView as it doesn’t have to perform any sorting.
After its initialization, the filterView will automatically run for inserted / updated rows after the parentView has processed them. It then gets the group from parentView, and invokes the filterBlock again (if needed).
You should choose a block type that takes the minimum number of required parameters. The filterView can make various optimizations based on required parameters of the block.
-
Undocumented
Declaration
Objective-C
+ (instancetype)withKeyBlock:(YapDatabaseViewFilteringWithKeyBlock)block;
Swift
class func withKeyBlock(_ block: @escaping YapDatabaseViewFilteringWithKeyBlock) -> Self
-
Undocumented
Declaration
Objective-C
+ (instancetype)withObjectBlock:(YapDatabaseViewFilteringWithObjectBlock)block;
Swift
class func withObjectBlock(_ block: @escaping YapDatabaseViewFilteringWithObjectBlock) -> Self
-
Undocumented
Declaration
Objective-C
+ (instancetype)withMetadataBlock:(YapDatabaseViewFilteringWithMetadataBlock)block;
Swift
class func withMetadataBlock(_ block: @escaping YapDatabaseViewFilteringWithMetadataBlock) -> Self
-
Undocumented
Declaration
Objective-C
+ (instancetype)withRowBlock:(YapDatabaseViewFilteringWithRowBlock)block;
Swift
class func withRowBlock(_ block: @escaping YapDatabaseViewFilteringWithRowBlock) -> Self
-
Undocumented
Declaration
Objective-C
+ (instancetype)withOptions:(YapDatabaseBlockInvoke)ops keyBlock:(YapDatabaseViewFilteringWithKeyBlock)block;
Swift
class func withOptions(_ ops: YapDatabaseBlockInvoke, keyBlock block: @escaping YapDatabaseViewFilteringWithKeyBlock) -> Self
-
Undocumented
Declaration
Objective-C
+ (instancetype)withOptions:(YapDatabaseBlockInvoke)ops objectBlock:(YapDatabaseViewFilteringWithObjectBlock)block;
Swift
class func withOptions(_ ops: YapDatabaseBlockInvoke, objectBlock block: @escaping YapDatabaseViewFilteringWithObjectBlock) -> Self
-
Undocumented
Declaration
Objective-C
+ (instancetype)withOptions:(YapDatabaseBlockInvoke)ops metadataBlock:(YapDatabaseViewFilteringWithMetadataBlock)block;
Swift
class func withOptions(_ ops: YapDatabaseBlockInvoke, metadataBlock block: @escaping YapDatabaseViewFilteringWithMetadataBlock) -> Self
-
Undocumented
Declaration
Objective-C
+ (instancetype)withOptions:(YapDatabaseBlockInvoke)ops rowBlock:(YapDatabaseViewFilteringWithRowBlock)block;
Swift
class func withOptions(_ ops: YapDatabaseBlockInvoke, rowBlock block: @escaping YapDatabaseViewFilteringWithRowBlock) -> Self
-
Undocumented
Declaration
Objective-C
@property (nonatomic, strong, readonly) YapDatabaseViewFilteringBlock block
Swift
var block: Any { get }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, assign, readonly) YapDatabaseBlockType blockType
Swift
var blockType: YapDatabaseBlockType { get }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, assign, readonly) YapDatabaseBlockInvoke blockInvokeOptions
Swift
var blockInvokeOptions: YapDatabaseBlockInvoke { get }