Latest0.6.1
Homepagehttps://github.com/QueryKit/RxQueryKit
LicenseBSD
Platformsios 8.0, osx 10.10, requires ARC
DependenciesRxSwift, QueryKit
FrameworksCoreData
Authors

QueryKit Logo

RxSwift extensions for QueryKit.

Usage

QuerySet

RxQueryKit extends QueryKit and provides methods to evaluate and execute
operations as observables.

let queryset = Person.queryset(context)
    .filter { $0.age > 25 }
    .orderBy { $0.name.ascending }

You can subscribe to any changes to the results of this queryset using the following:

queryset.objects().subscribeNext {
  print($0)
}

You can also subscribe to the number of matching objects:

queryset.count().subscribeNext {
  print("There are now ($0) people who are more than 25.")
}

Managed Object Context

RxQueryKit provides extensions on managed object context to observe when the
objects in a context change or when a context will or did save.

It provides a type safe structure providing the changes objects.

context.qk_objectsDidChange().subscribeNext { notification in
  print("Objects did change:")
  print(notification.insertedObjects)
  print(notification.updatedObjects)
  print(notification.deletedObjects)
}

context.qk_willSave().subscribeNext { notification in
  print("Context will save")
}

context.qk_didSave().subscribeNext { notification in
  print("Context did save")
}

Installation

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

pod 'RxQueryKit'

License

QueryKit is released under the BSD license. See LICENSE.

Latest podspec

{
    "name": "RxQueryKit",
    "version": "0.6.1",
    "summary": "RxSwift extensions for dealing with QueryKit",
    "homepage": "https://github.com/QueryKit/RxQueryKit",
    "license": {
        "type": "BSD",
        "file": "LICENSE"
    },
    "authors": {
        "Kyle Fuller": "[email protected]"
    },
    "social_media_url": "http://twitter.com/kylefuller",
    "source": {
        "git": "https://github.com/QueryKit/RxQueryKit.git",
        "tag": "0.6.1"
    },
    "frameworks": [
        "CoreData"
    ],
    "source_files": "RxQueryKit/*.swift",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    },
    "requires_arc": true,
    "dependencies": {
        "RxSwift": [
            "~> 3.0"
        ],
        "QueryKit": [
            "~> 0.13.0"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This