How to set up Android OR mapper "Orma" (Kotlin)

What is "Orma"?

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.

environment

setup

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.

in conclusion

You can now use Orma to work with SQLite!

Reference link

Recommended Posts

How to set up Android OR mapper "Orma" (Kotlin)
How to set up and use kapt
How to set up and operate jEnv (Mac)
How to set up JavaED Full Edition (pleiades)
How to set Docker nginx
How to set Java constants
How to set up a proxy with authentication in Feign
How to set up SSH from scratch without connecting a monitor or keyboard [Raspberry Pi, Ubuntu]
How to "hollow" View on Android
How to set Spring Boot + PostgreSQL
[Rails] How to speed up docker-compose
How to use MyBatis Mapper annotation
[Note] How to restart the Windows container set up with docker-compose
[Android] Convert Android Java code to Kotlin
[Android] How to make Dialog Fragment
[Android] How to deal with dark themes
How to detect microphone conflicts on Android
Convert all Android apps (Java) to Kotlin
How to remote debug Java 9 or later
[Java] How to set the Date time to 00:00:00
Needed for iOS 14? How to set NSUserTrackingUsageDescription
How to use ExpandableListView in Android Studio
How to set up computer vision for tracking images and videos with TrackingJs
[Android] How to convert a character string to resourceId
[Android] How to detect volume change (= volume button press)
[Java] (for MacOS) How to set the classpath
[Java] How to substitute Model Mapper in Jackson
How to write React Native bridge ~ Android version ~
[Android] Correct order to set Context in Dao
How to make an crazy Android music player
Spring Boot --How to set session timeout time
[Swift5] How to round off, round down, and round up to the second or third decimal place