-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1624 from agrosner/develop
5.0.0-alpha1
- Loading branch information
Showing
710 changed files
with
23,051 additions
and
28,659 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# .github | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,98 @@ | ||
# README | ||
|
||
![Image](https://github.com/agrosner/DBFlow/blob/develop/dbflow_banner.png?raw=true) | ||
|
||
[![JitPack.io](https://img.shields.io/badge/JitPack.io-4.2.3-red.svg?style=flat)](https://jitpack.io/#Raizlabs/DBFlow) [![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%23129-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-129) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DBFlow-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1134) | ||
[![JitPack.io](https://img.shields.io/badge/JitPack.io-5.0.0alpha1-red.svg?style=flat)](https://jitpack.io/#Raizlabs/DBFlow) [![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%23129-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-129) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DBFlow-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1134) | ||
|
||
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. | ||
|
||
Supports: | ||
|
||
**Kotlin:** Built using the language, the library is super-concise, null-safe and efficient. | ||
|
||
**Coroutines:** Adds coroutine support for queries. | ||
|
||
A robust, powerful, and very simple ORM android database library with **annotation processing**. | ||
**RX Java:** Enable applications to be reactive by listening to DB changes and ensuring your subscribers are up-to-date. | ||
|
||
The library is built on speed, performance, and approachability. It not only eliminates most boiler-plate code for dealing with databases, but also provides a powerful and simple API to manage interactions. | ||
**Paging:** Android architecture component paging library support for queries via `QueryDataSource`. | ||
|
||
Let DBFlow make SQL code _flow_ like a _steady_ stream so you can focus on writing amazing apps. | ||
**SQLCipher:** Easy database encryption support in this library. | ||
|
||
# Why Use DBFlow | ||
DBFlow is built from a collection of the best features of many database libraries in the most efficient way possible. Also, it is built to not only make it _significantly_ easier to deal with databases on Android, but also to provide extensibility. Don't let an ORM or library get in your way, let the code you write in your applications be the best as possible. | ||
- **Extensibility**: No restrictions on inheritance of your table classes. They can be plain POJOs, no subclass required, but as a convenience we recommend using `BaseModel`. You can extend non-`Model` classes in different packages and use them as your DB tables. Also you can subclass other tables to join the `@Column` together, and again they can be in different packages. | ||
- **Speed**: Built with java's annotation processing code generation, there's almost zero runtime performance hit by using this library (only reflection is creation of the main, generated database module's constructor). This library saves hours of boilerplate code and maintenance by generating the code for you. With powerful model caching (multiple primary key `Model` too), you can surpass the speed of SQLite by reusing where possible. We have support for lazy-loading relationships on-demand such as `@ForeignKey` or `@OneToMany` that make queries happen super-fast. | ||
- **SQLite Query Flow**: The queries in this library adhere as closely as possible to SQLite native queries. `select(name, screenSize).from(Android.class).where(name.is("Nexus 5x")).and(version.is(6.0)).querySingle()` | ||
- **Open Source**: This library is fully open source and contributions are not only welcomed, but encouraged. | ||
- **Robust**: We support `Trigger`, `ModelView`, `Index`, `Migration`, built-in ways to manage database access, and many more features. SQLCipher, RXJava, and more! | ||
- **Multiple Databases, Multiple Modules**: we seamlessly support multiple database files, database modules using DBFlow in other dependencies, simultaneously. | ||
- **Built On SQLite**: SQLite is the most widely used database engine in world and using it as your base, you are not tied to a limited set of platforms or libraries. | ||
**SQLite Query Language:** Enabling autocompletion on sqlite queries combined with Kotlin language features means SQLite-like syntax. | ||
|
||
# Changelog | ||
## Changelog | ||
|
||
Changes exist in the [releases tab](https://github.com/Raizlabs/DBFlow/releases). | ||
|
||
# Usage Docs | ||
## Usage Docs | ||
|
||
For more detailed usage, check out it out [here](https://agrosner.gitbooks.io/dbflow/content/) | ||
|
||
# Including in your project | ||
## Including in your project | ||
|
||
```groovy | ||
Add jitpack.io to your project's repositories: | ||
|
||
```groovy | ||
allProjects { | ||
repositories { | ||
google() | ||
// required to find the project's artifacts | ||
// place last | ||
maven { url "https://www.jitpack.io" } | ||
} | ||
} | ||
``` | ||
|
||
Add the library to the project-level build.gradle, using the apt plugin to enable Annotation Processing: | ||
Add artifacts to your project: | ||
|
||
```groovy | ||
apply plugin: 'kotlin-kapt' // only required for kotlin consumers. | ||
apply plugin: 'kotlin-kapt' // required for kotlin. | ||
def dbflow_version = "4.2.4" | ||
// or dbflow_version = "develop-SNAPSHOT" for grabbing latest dependency in your project on the develop branch | ||
def dbflow_version = "5.0.0-alpha1" | ||
// or 10-digit short-hash of a specific commit. (Useful for bugs fixed in develop, but not in a release yet) | ||
dependencies { | ||
// if Java use this. If using Kotlin do NOT use this. | ||
annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:${dbflow_version}" | ||
// Use if Kotlin user. | ||
kapt "com.github.Raizlabs.DBFlow:dbflow-processor:${dbflow_version}" | ||
kapt "com.github.agrosner.dbflow:processor:${dbflow_version}" | ||
compile "com.github.Raizlabs.DBFlow:dbflow-core:${dbflow_version}" | ||
compile "com.github.Raizlabs.DBFlow:dbflow:${dbflow_version}" | ||
// Annotation Processor | ||
// if only using Java, use this. If using Kotlin do NOT use this. | ||
annotationProcessor "com.github.agrosner.dbflow:processor:${dbflow_version}" | ||
// core set of libraries | ||
compile "com.github.agrosner.dbflow:core:${dbflow_version}" | ||
compile "com.github.agrosner.dbflow:lib:${dbflow_version}" | ||
// sql-cipher database encryption (optional) | ||
compile "com.github.Raizlabs.DBFlow:dbflow-sqlcipher:${dbflow_version}" | ||
compile "com.github.agrosner.dbflow:sqlcipher:${dbflow_version}" | ||
compile "net.zetetic:android-database-sqlcipher:${sqlcipher_version}@aar" | ||
// kotlin extensions | ||
compile "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${dbflow_version}" | ||
// RXJava 1 support | ||
compile "com.github.Raizlabs.DBFlow:dbflow-rx:${dbflow_version}" | ||
// RXJava 2 support | ||
compile "com.github.agrosner.dbflow:reactive-streams:${dbflow_version}" | ||
// RXJava 1 Kotlin Extensions Support | ||
compile "com.github.Raizlabs.DBFlow:dbflow-rx-kotlinextensions:${dbflow_version}" | ||
// Kotlin Coroutines | ||
compile "com.github.agrosner.dbflow:coroutines:${dbflow_version}" | ||
// RXJava 2 support | ||
compile "com.github.Raizlabs.DBFlow:dbflow-rx2:${dbflow_version}" | ||
// Android Architecture Components Paging Library Support | ||
compile "com.github.agrosner.dbflow:paging:${dbflow_version}" | ||
// RXJava 2 Kotlin Extensions Support | ||
compile "com.github.Raizlabs.DBFlow:dbflow-rx2-kotlinextensions:${dbflow_version}" | ||
// adds generated content provider annotations + support. | ||
compile "com.github.agrosner.dbflow:contentprovider:${dbflow_version}" | ||
} | ||
``` | ||
|
||
# Pull Requests | ||
I welcome and encourage all pull requests. Please read over these guidelines to ensure smooth PR attention: | ||
1. Match coding style (braces, spacing, etc.) This is best achieved using **Reformat Code** shortcut, <kbd>command</kbd>+<kbd>option</kbd>+<kbd>L</kbd> on Mac and <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>L</kbd> 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! | ||
## 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](https://www.raizlabs.com), a [Rightpoint](https://www.rightpoint.com) company | ||
|
||
Maintained by [agrosner](https://github.com/agrosner) \([@agrosner](https://www.twitter.com/agrosner)\) | ||
|
||
# Maintained By | ||
[agrosner](https://github.com/agrosner) ([@agrosner](https://www.twitter.com/agrosner)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Table of contents | ||
|
||
* [README](README.md) | ||
* [GettingStarted](gettingstarted.md) | ||
* [Usage Docs](usage2/README.md) | ||
* [Including In Project](usage2/including-in-project.md) | ||
* [Proguard](usage2/proguard.md) | ||
* [Main Usage](usage2/usage/README.md) | ||
* [Databases](usage2/usage/databases.md) | ||
* [Models](usage2/usage/models.md) | ||
* [Migrations](usage2/usage/migrations.md) | ||
* [Views](usage2/usage/modelviews.md) | ||
* [Relationships](usage2/usage/relationships.md) | ||
* [Storing Data](usage2/usage/storingdata.md) | ||
* [Retrieval](usage2/usage/retrieval.md) | ||
* [SQLite Query Language](usage2/usage/sqlitewrapperlanguage.md) | ||
* [TypeConverters](usage2/usage/typeconverters.md) | ||
* [Observability](usage2/usage/observability.md) | ||
* [RXJavaSupport](usage2/rxjavasupport.md) | ||
* [Advanced Usage](usage2/advanced-usage/README.md) | ||
* [Caching](usage2/advanced-usage/caching.md) | ||
* [ListBasedQueries](usage2/advanced-usage/listbasedqueries.md) | ||
* [MultipleModules](usage2/advanced-usage/multiplemodules.md) | ||
* [QueryModels](usage2/advanced-usage/querymodels.md) | ||
* [Indexing](usage2/advanced-usage/indexing.md) | ||
* [SQLCipher](usage2/advanced-usage/sqlciphersupport.md) | ||
* [ContentProviderGeneration](usage2/contentprovidergeneration.md) | ||
* [Migration4Guide](usage2/migration4guide.md) | ||
* [ISSUE\_TEMPLATE](issue_template.md) | ||
* [.github](.github/README.md) | ||
* [CONTRIBUTING](.github/contributing.md) | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apply plugin: 'kotlin' | ||
|
||
project.ext.artifactId = bt_name | ||
|
||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
dependencies { | ||
compile deps.kotlin | ||
compile project(':core') | ||
} | ||
|
||
apply from: '../kotlin-artifacts.gradle' | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
apiVersion = "1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bt_name=contentprovider-annotations | ||
bt_packaging=jar | ||
bt_artifact_id=contentprovider-annotations |
Oops, something went wrong.