I am developing an application aimed at helping school students. Therefore, I do not understand which database to use. The main language is Kotlin. I will use it as Kotlin Multi platform to develop an application for two operating systems(IOS and Android) at once.
>Solution :
SQLDelight library is the easiest. It generates type-safe Kotlin APIs from SQL statements for various relational databases. SQLDelight also provides a multiplatform implementation of the SQLite driver.
To connect the SQLDelight plugin to a project, apply the SQLDelight Gradle plugin in your project’s build script (root build.gradle or build.gradle.kts):
quoted from kotlin
First, add the plugin’s classpath to the build system.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.squareup.sqldelight:gradle-plugin:$sql_delight_version")
}
}
Copied!
Instead of
$sql_delight_version, use the version you need for your
project.Then apply the SQLDelight Gradle plugin by adding this line at the
beginning of the build script (build.gradleorbuild.gradle.kts)
in your shared multiplatform module
https://kotlinlang.org/docs/kmm-configure-sqldelight-for-data-storage.html#gradle-plugin