YapDatabaseAutoView
@interface YapDatabaseAutoView : YapDatabaseView
Welcome to YapDatabase!
https://github.com/yapstudios/YapDatabase
The project wiki has a wealth of documentation if you have any questions. https://github.com/yapstudios/YapDatabase/wiki
YapDatabaseAutoView is an extension designed to work with YapDatabase.
It gives you a persistent sorted view
of a configurable subset of your data.
For the full documentation on Views, please see the related wiki article: https://github.com/yapstudios/YapDatabase/wiki/Views
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithGrouping:(YapDatabaseViewGrouping *)grouping sorting:(YapDatabaseViewSorting *)sorting;
Swift
init(grouping: YapDatabaseViewGrouping, sorting: YapDatabaseViewSorting)
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithGrouping:(YapDatabaseViewGrouping *)grouping sorting:(YapDatabaseViewSorting *)sorting versionTag:(nullable NSString *)versionTag;
Swift
init(grouping: YapDatabaseViewGrouping, sorting: YapDatabaseViewSorting, versionTag: String?)
-
See the wiki for an example of how to initialize a view: https://github.com/yapstudios/YapDatabase/wiki/Views#wiki-initializing_a_view
Declaration
Objective-C
- (nonnull instancetype) initWithGrouping:(nonnull YapDatabaseViewGrouping *)grouping sorting:(nonnull YapDatabaseViewSorting *)sorting versionTag:(nullable NSString *)versionTag options:(nullable YapDatabaseViewOptions *)options;
Swift
init(grouping: YapDatabaseViewGrouping, sorting: YapDatabaseViewSorting, versionTag: String?, options: YapDatabaseViewOptions?)
Parameters
grouping
The grouping block handles both filtering and grouping. There are multiple groupingBlock types that are supported.
See
YapDatabaseViewTypes.h for block type definitions.sorting
The sorting block handles sorting of objects within their group. There are multiple sortingBlock types that are supported.
See
YapDatabaseViewTypes.h for block type definitions.versionTag
If, after creating a view, you need to change either the groupingBlock or sortingBlock, then simply use the versionTag parameter. If you pass a versionTag that is different from the last initialization of the view, then the view will automatically flush its tables, and re-populate itself.
options
The options allow you to specify things like creating an in-memory-only view (non persistent).
-
Undocumented
Declaration
Objective-C
@property (nonatomic, strong, readonly) YapDatabaseViewGrouping *grouping
Swift
var grouping: YapDatabaseViewGrouping { get }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, strong, readonly) YapDatabaseViewSorting *sorting
Swift
var sorting: YapDatabaseViewSorting { get }