ReactiveQueryKit 0.1.0

ReactiveQueryKit 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License BSD
ReleasedLast Release Dec 2014

Maintained by Kyle Fuller.



 
Depends on:
ReactiveCocoa~> 2.0
QueryKit>= 0
 

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.

Usage

Query Set

ReactiveQueryKit extends QueryKit and provides methods to evaluate and execute operations as Signals.

Count

[[queryset count] subscribeNext:^(NSNumber *count) {
    NSLog(@"QuerySet count has been updated %@", count);
}];

Objects

[[queryset objects] subscribeNext:^(NSArray *objects) {
    NSLog(@"QuerySet objects has been updated %@", objects);
}];

NSManagedObjectContext

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

Installation

CocoaPods is the recommended way to add ReactiveQueryKit to your project.

pod 'ReactiveQueryKit', :git => 'https://github.com/QueryKit/ReactiveQueryKit'

License

QueryKit is released under the BSD license. See LICENSE.