<commit_before>RxGRDB [![Swift](https://img.shields.io/badge/swift-3.1-orange.svg?style=flat)](https://developer.apple.com/swift/) [![Platforms](https://img.shields.io/cocoapods/p/RxGRDB.svg)](https://developer.apple.com/swift/) [![License](https://img.shields.io/github/license/RxSwiftCommunity/RxGRDB.svg?maxAge=2592000)](/LICENSE)
======

### A set of reactive extensions for SQLite and [GRDB.swift](http://github.com/groue/GRDB.swift)

**Latest release**: April 6, 2017 &bull; version 0.1.2 &bull; [Release Notes](CHANGELOG.md)

**Requirements**: iOS 8.0+ / OSX 10.10+ / watchOS 2.0+ • Xcode 8.3+ • Swift 3.1

---

## Usage

**RxGRDB produces RxSwift observables from GRDB requests.**

GRDB requests are built with the [query interface](https://github.com/groue/GRDB.swift#the-query-interface). For example:

```swift
let request = Person.filter(emailColumn != nil).order(nameColumn)
```

You can fetch values from those requests, or track them in a reactive way with RxGRDB:

```swift
// Non-reactive
dbQueue.inDatabase { db in
    let persons = request.fetchAll(db) // [Person]
}

// Reactive:
let persons = request.rx.fetchAll(in: dbQueue)
persons.subscribe(onNext: { persons: [Person] in
    ...
})
```


## Documentation

- [Installation](#installation)
- [Observing Requests](#observing-requests)


### Installation

You can install RxGRDB with [CocoaPods](http://cocoapods.org/):

1. Install cocoapods version 1.1 or higher

2. Specify in your Podfile:
<commit_msg>Add missing `try`<commit_after>RxGRDB [![Swift](https://img.shields.io/badge/swift-3.1-orange.svg?style=flat)](https://developer.apple.com/swift/) [![Platforms](https://img.shields.io/cocoapods/p/RxGRDB.svg)](https://developer.apple.com/swift/) [![License](https://img.shields.io/github/license/RxSwiftCommunity/RxGRDB.svg?maxAge=2592000)](/LICENSE)
======

### A set of reactive extensions for SQLite and [GRDB.swift](http://github.com/groue/GRDB.swift)

**Latest release**: April 6, 2017 &bull; version 0.1.2 &bull; [Release Notes](CHANGELOG.md)

**Requirements**: iOS 8.0+ / OSX 10.10+ / watchOS 2.0+ • Xcode 8.3+ • Swift 3.1

---

## Usage

**RxGRDB produces RxSwift observables from GRDB requests.**

GRDB requests are built with the [query interface](https://github.com/groue/GRDB.swift#the-query-interface). For example:

```swift
let request = Person.filter(emailColumn != nil).order(nameColumn)
```

You can fetch values from those requests, or track them in a reactive way with RxGRDB:

```swift
// Non-reactive
try dbQueue.inDatabase { db in
    let persons = try request.fetchAll(db) // [Person]
}

// Reactive:
let persons = request.rx.fetchAll(in: dbQueue)
persons.subscribe(onNext: { persons: [Person] in
    ...
})
```


## Documentation

- [Installation](#installation)
- [Observing Requests](#observing-requests)


### Installation

You can install RxGRDB with [CocoaPods](http://cocoapods.org/):

1. Install cocoapods version 1.1 or higher

2. Specify in your Podfile:

{'fraction_non_alphanumeric': 0.1700404858299595, 'fraction_numerical': 0.022267206477732792, 'mean_word_length': 4.542056074766355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '275546', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1012, 'n_words': 238}