Realm With Jetpack Compose
In this article we will be talking about Realm with Jetpack Compose. Realm is a popular database library for managing local database in a mobile application (same as Room DB).
It uses Mongo as a query language.
Basically it is a ORM (Object Relation Mapping) , that provides some helper functions for the CRUD (Create , Read , Update , Delete) operations. Now you don’t need to write queries , we only use that helper functions for the queries.
So we are going to make a very simple application for better understanding. We will create a Note application , where we perform Add , Show , Delete and Update notes . Alright !!
Dependencies
// dagger hilt
implementation(libs.dagger.hilt)
kapt(libs.hilt.compiler)
implementation(libs.hilt.navigation.compose)
// realm db
implementation(libs.realm.base)
implementation(libs.realm.sync)
//coroutines
implementation(libs.coroutine.android)
implementation(libs.coroutine.core)
// navigation
implementation(libs.compose.navigation)