# sqldelight/sqldelight

SQLDelight - Generates typesafe Kotlin APIs from SQL

Repository: https://github.com/sqldelight/sqldelight
Canonical: https://ross.abutalabs.com/products/sqldelight
Homepage: https://sqldelight.github.io/sqldelight/
Language: Kotlin
License: Apache-2.0
License Family: permissive
Topics: kotlin-multiplatform, sql, sqldelight
Last push: 2026-08-26T12:05:28+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 51, longevity 100
- inputs: {"age_days": 3969, "days_push": 7, "days_rel": 170, "gap_med": 151.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6865, forks 576 (observed 2026-08-28T04:09:50.987314+00:00)

## What it is
SQLDelight is a Kotlin code generation tool that produces typesafe APIs from SQL statements. It verifies schemas, queries, and migrations at compile time and supports SQLite across Android, iOS, JVM, JS, and Kotlin Multiplatform, plus MySQL, PostgreSQL, and H2 on the JVM.

## Use cases
- generate typesafe kotlin code from sql queries
- use sqlite in kotlin multiplatform apps
- verify sql schema and migrations at compile time
- local database persistence for android apps
- share database code between ios and android
- query mysql or postgresql with typesafe kotlin apis

## When to choose
- you write sql by hand and want compile-time safety and IDE support
- you need a shared local database across kotlin multiplatform targets
- you want schema and migration verification in your build

## When to avoid
- you prefer a runtime ORM with entity mapping over sql-first codegen
- your project is not on the jvm/kotlin ecosystem
- you need a database dialect not covered by sqldelight

## Facets
- artifact type: library
- maturity: active
- function: database, orm, type-system
- domain: databases, mobile-development, developer-tools, cross-platform
- platform: jvm, windows
- tags: kotlin, sql, sqlite, mysql, postgresql, compile-time-verification, schema-migrations, gradle-plugin, jetbrains-ide-plugin, code-generation, android, ios, macos, kotlin-multiplatform, javascript

## Member repositories
- sqldelight/sqldelight (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:50.987314+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:41:42.441027+00:00, confidence not recorded.
  - readme: https://github.com/sqldelight/sqldelight (fetched 2026-08-28T04:09:50.987314+00:00, sha 56883c4819ab)
  - homepage: https://sqldelight.github.io/sqldelight/ (fetched 2026-08-29T08:37:33.728345+00:00, sha 9630f1761fdb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
