OR mapper for SQLite. You will be able to easily operate SQLite.
As of October 3, 2019, there is an official SQLite OR mapper called "Room", so Orma is adopted in a new project. You may have less to do. However, I think that Orma may be used because there are many articles on the Web.
Just add the dependency of Orma and RxJava to "build.gradle" under the app folder.
/app/build.gradle
dependencies {
    ext {
+       orma_version = '6.0.2'
+       rxjava_version = '2.2.12'
    }
…
+   // Orma
+   kapt "com.github.maskarade.android.orma:orma-processor:$orma_version"
+   implementation "com.github.maskarade.android.orma:orma:$orma_version"
+   // RxJava
+   implementation "io.reactivex.rxjava2:rxjava:$rxjava_version"
}
For Java, use ʻannotationProcessorinstead ofkapt`.
Orma uses RxJava, so if you don't write RxJava, you'll get a build error where you can't find symbols such as Completable and Single.
You can now use Orma to work with SQLite!
Recommended Posts