DBFlow
Search…
README
Could not load image
Image
DBFlow is fast, efficient, and feature-rich Kotlin database library built on SQLite for Android. DBFlow utilizes annotation processing to generate SQLite boilerplate for you and provides a powerful SQLite query language that makes using SQLite a joy.
DBFlow is built from a collection of some of the best features of many database libraries. Don't let an ORM or library get in your way, let the code you write in your applications be the best as possible.
DBFlow Contains:
Kotlin: Built using the language, the library is super-concise, null-safe and efficient.
Annotation Processor: Generates the necessary code that you don't need to write.
Core: Contains the main annotations and misc classes that are shared across all of DBFlow.
DBFlow: The main library artifact used in conjunction with the previous two artifacts.
Coroutines: Adds coroutine support for queries.
RX Java: Enable applications to be reactive by listening to DB changes and ensuring your subscribers are up-to-date.
Paging: Android architecture component paging library support for queries via QueryDataSource.
LiveData: Android architecture LiveData support for queries on table changes.
SQLCipher: Easy database encryption support in this library.
SQLite Query Language: Enabling autocompletion on sqlite queries combined with Kotlin language features means SQLite-like syntax.

Changelog

Changes exist in the releases tab.

Usage Docs

For more detailed usage, check out it out here

Including in your project

Add jitpack.io to your project's repositories:
1
allProjects {
2
repositories {
3
google()
4
// required to find the project's artifacts
5
// place last
6
maven { url "https://www.jitpack.io" }
7
}
8
}
Copied!
Add artifacts to your project:
1
apply plugin: 'kotlin-kapt' // only required for kotlin consumers.
2
3
def dbflow_version = "5.0.0-alpha2"
4
// or 10-digit short-hash of a specific commit. (Useful for bugs fixed in develop, but not in a release yet)
5
6
dependencies {
7
8
// Use if Kotlin user.
9
kapt "com.github.agrosner.dbflow:processor:${dbflow_version}"
10
11
// Annotation Processor
12
// if only using Java, use this. If using Kotlin do NOT use this.
13
annotationProcessor "com.github.agrosner.dbflow:processor:${dbflow_version}"
14
15
16
// core set of libraries
17
implementation "com.github.agrosner.dbflow:core:${dbflow_version}"
18
implementation "com.github.agrosner.dbflow:lib:${dbflow_version}"
19
20
// sql-cipher database encryption (optional)
21
implementation "com.github.agrosner.dbflow:sqlcipher:${dbflow_version}"
22
implementation "net.zetetic:android-database-sqlcipher:${sqlcipher_version}@aar"
23
24
// RXJava 2 support
25
implementation "com.github.agrosner.dbflow:reactive-streams:${dbflow_version}"
26
27
// Kotlin Coroutines
28
implementation "com.github.agrosner.dbflow:coroutines:${dbflow_version}"
29
30
// Android Architecture Components Paging Library Support
31
implementation "com.github.agrosner.dbflow:paging:${dbflow_version}"
32
33
// Android Architecture Components LiveData Library Support
34
implementation "com.github.agrosner.dbflow:livedata:${dbflow_version}"
35
36
// adds generated content provider annotations + support.
37
implementation "com.github.agrosner.dbflow:contentprovider:${dbflow_version}"
38
39
}
Copied!

Pull Requests

I welcome and encourage all pull requests. Here are some basic rules to follow to ensure timely addition of your request: 1. Match coding style (braces, spacing, etc.) This is best achieved using Reformat Code shortcut, command+option+L on Mac and Ctrl+Alt+L on Windows, with Android Studio defaults. 2. If its a feature, bugfix, or anything please only change code to what you specify. 3. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :) 4. Pull requests must be made against develop branch. Any other branch (unless specified by the maintainers) will get rejected. 5. Have fun!

Maintainer

Originally created by Raizlabs, a Rightpoint company
Maintained by agrosner (@agrosner)
Last modified 8mo ago