ReactiveCocoa extensions for QueryKit. Currently it only supports the Objective-C variant of QueryKit and ReactiveCocoa. Once ReactiveCocoa 3.0 comes out we will implement a native Swift version using ReactiveCocoa 3.0.
ReactiveQueryKit extends QueryKit and provides methods to evaluate and execute operations as Signals.
[[queryset count] subscribeNext:^(NSNumber *count) {
NSLog(@"QuerySet count has been updated %@", count);
}];
[[queryset objects] subscribeNext:^(NSArray *objects) {
NSLog(@"QuerySet objects has been updated %@", objects);
}];
We have also extended NSManagedObjectContext providing a bunch of signals.
@interface NSManagedObjectContext (ReactiveQueryKit)
/// Returns a signal that sends the NSNotification for NSManagedObjectContextObjectsDidChangeNotification in the current context
- (RACSignal *)rqk_objectsDidChangeSignal;
/// Returns a signal that sends the NSNotification for NSManagedObjectContextWillSaveNotification in the current context
- (RACSignal *)rqk_willSaveSignal;
/// Returns a signal that sends the NSNotification for NSManagedObjectContextDidSaveNotification in the current context
- (RACSignal *)rqk_didSaveSignal;
@end
CocoaPods is the recommended way to add ReactiveQueryKit to your project.
pod 'ReactiveQueryKit', :git => 'https://github.com/QueryKit/ReactiveQueryKit'
QueryKit is released under the BSD license. See LICENSE.