RxDbflow

Additional

Language
Java
Version
N/A
Created
Oct 9, 2016
Updated
Jun 26, 2017 (Retired)
Owner
Roadhouse Digital (roadhouse-dev)
Contributors
Roadhouse Digital (roadhouse-dev)
Dwayne Hoy (dwaynehoy)
dwayne-roadhouse
3
Activity
Badge
Generate
Download
Source code

RxDBFlow

RxJava bindings for DBFlow models, and query language

Download

Add the JitPack repository to your root build file

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    }
}

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

For RxJava1 add the dependencies:

dependencies {
    apt 'com.github.Raizlabs.DBFlow:dbflow-processor:4.0.0-beta7'
    compile 'com.github.Raizlabs.DBFlow:dbflow-core:4.0.0-beta7'
    compile 'com.github.Raizlabs.DBFlow:dbflow:4.0.0-beta7'
    compile 'com.github.roadhouse-dev.RxDbflow:rxdbflow-rx1:<Version>'
}

or for RxJava2 add the dependencies:

dependencies {
    apt 'com.github.Raizlabs.DBFlow:dbflow-processor:4.0.0-beta7'
    compile 'com.github.Raizlabs.DBFlow:dbflow-core:4.0.0-beta7'
    compile 'com.github.Raizlabs.DBFlow:dbflow:4.0.0-beta7'
    compile 'com.github.roadhouse-dev.RxDbflow:rxdbflow-rx2:<Version>'
}

At the moment only DBFlow version 4.0.0-beta7 is supported

Build

$ git clone https://github.com/roadhouse-dev/RxDbflow.git
$ ./gradlew build

DBFlow documentation

For help with DBFlow please take a look at DBFlow GitHub

Scheduler

RxDBFlow now comes with it's own scheduler (DBFlowSchedulers.background()), this is a single threaded scheduler that will ensure all database operations happen from the same background thread. Using a multi-threaded scheduler like Schedulers.io() can cause deadlocks.

Sample usage

There are slight differences between rx1 and rx2

Rx1 Sample usage

View here

Rx2 Sample usage

View here

Bugs and Feedback

For RxDBFlow bugs, questions and discussions please use the GitHub Issues.

For DBFlow specific bugs, questions and discussions please use the GitHub Issues.

Pull Requests

All pull requests are welcome, however to make the whole process smoother please use the following guides

  • All pull requests should be against the develop branch
  • Code formatting should match the default Android Studio format
  • Limit code changes to the scope of what you're implementing
  • Provide standard JavaDoc for any public accessible members and classes