Skip to content

Repository files navigation

Sqlx4k-sqldelight

Build Maven Central GitHub License GitHub commit activity GitHub issues Kotlin

A coroutine-first SQL toolkit with compile-time query validations for Kotlin Multiplatform. PostgreSQL, MySQL/MariaDB, and SQLite supported.


This repository only contains the necessary parts for the sqldelight integration. If you are looking the driver implementation, you can find it here: https://github.com/smyrgeorge/sqlx4k

📖 Documentation

🏠 Homepage (under construction)

Usage

Only PostgreSQL and MySQL/MariaDB are supported for now.

// build.gradle.kts
kotlin {
    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation("io.github.smyrgeorge:sqlx4k-postgres:x.y.z")
                implementation("io.github.smyrgeorge:sqlx4k-sqldelight:x.y.z")
            }
        }
    }
}

sqldelight {
    databases.register("Database") {
        generateAsync = true
        packageName = "db.entities"
        dialect("io.github.smyrgeorge:sqlx4k-sqldelight-dialect-postgres:x.y.z")
        // Or 'io.github.smyrgeorge:sqlx4k-sqldelight-dialect-mysql:x.y.z' for MySQl/MariaDB.
        // Or 'io.github.smyrgeorge:sqlx4k-sqldelight-dialect-sqlite:x.y.z' for SQLite.
    }
}

Check the examples for more information.

Supported targets

We support the following targets:

  • jvm
  • iosArm64
  • iosSimulatorArm64
  • androidNativeX64
  • androidNativeArm64
  • macosArm64
  • linuxArm64
  • linuxX64
  • mingwX64
  • wasmWasi (potential future candidate)

About

A coroutine-first SQL toolkit with compile-time query validations for Kotlin Multiplatform. PostgreSQL, MySQL/MariaDB, and SQLite supported.

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages