Closed shebinkoshy closed 6 years ago
I have updated my group objects filtering way and created a single group. Sorted with movie name also
YapDatabaseViewGrouping *viewGrouping = [YapDatabaseViewGrouping withObjectBlock:^NSString *(YapDatabaseReadTransaction *transaction, NSString *collection, NSString *key, id object) {
NFMovie *movie = (NFMovie*)object;
if([movie isDetectiveMovieWithTransaction:transaction]) {
return @"detectiveMovies";
}
return nil;
}];
So i am closing now.
Consider below example,
i use following code for consolidate these groups
[mappings setAutoConsolidateGroupsThreshold:INTMAX_MAX withName:@"oneSection"];
But how can i sort all movies in alphabetical order from consolidated group?
Current output
@[ <@"movies", @"abc123">, <@"movies", @"wyz123">, <@"movies", @"dfx214">, <@"movies", @"qcas214"] // Goldfinger, Tomorrow never dies, Detektiv Braun, Jighansa
Expected output Sorted with movie name
@[ <@"movies", @"dfx214">, <@"movies", @"abc123">, <@"movies", @"qcas214">, <@"movies", @"wyz123">] // Detektiv Braun, Goldfinger, Jighansa, Tomorrow never dies