SQLDelight
sqldelight.github.io
- Free plan
- Open source
- Windows
- macOS
- Linux
- Web
- iPhone and iPad
- Android
- API
- Self-hosted
What SQLDelight is
SQLDelight is a free, open-source Kotlin library that generates typesafe Kotlin APIs from SQL statements. It checks database schemas, SQL statements, and migrations at compile time, and its IDE support includes SQL autocomplete and refactoring. Documented dialects include SQLite, MySQL, and PostgreSQL; HSQL and H2 are experimental, while CockroachDB, DB2, and Oracle dialects are listed as third-party options. For JVM connections, the overview lists MySQL and PostgreSQL, with JDBC and R2DBC variants shown for supported dialects. SQLDelight provides a Gradle plugin and extensions for Kotlin coroutines, RxJava, and AndroidX Paging. Its coroutines extension can expose a query as a Flow and emit updated results when database data used by that query changes. The Gradle verifySqlDelightMigration task applies migrations to stored schema databases and checks whether they reach the latest schema. An IntelliJ plugin section is also included in the documentation. The project page lists the Apache-2.0 license, and platforms listed include Android, API, iOS, Linux, macOS, web, and Windows.
Who it suits
SQLDelight suits Kotlin developers who want SQL schemas, statements, and migrations checked during compilation. Its dialect and platform support make it relevant to teams building across the listed environments.
Good to know, and what to watch
- Checks schemas, SQL, and migrations at compile time.
- IDE support includes autocomplete and refactoring.
- Offers extensions for coroutines, RxJava, and Paging.
- Includes a Gradle migration verification task.
- HSQL and H2 dialects are experimental.
- Some listed dialects are third-party options.
Plans
Every plan and priceOpen-source SQLDelight
SQLDelight
Open source
Getting started
- Open https://sqldelight.github.io/sqldelight/
- Add the SQLDelight Gradle plugin to the Kotlin project
- Define database schemas and SQL statements
- Use generated Kotlin APIs in the application
- Run verifySqlDelightMigration to check migrations
The verdict
SQLDelight brings SQL checks and Kotlin API generation into a build workflow. Teams should confirm that its documented dialects and JVM connection options match their database setup.
Questions people ask
Is SQLDelight free?
Yes. The listed SQLDelight plan is free at no cost, and it is open source.
What license does SQLDelight use?
The GitHub project page lists the Apache-2.0 license.
Which platforms are supported?
Support is listed for Android, API, iOS, Linux, macOS, web, and Windows.
Which database dialects are documented?
Documented dialects include SQLite, MySQL, and PostgreSQL. HSQL and H2 are experimental, while CockroachDB, DB2, and Oracle are listed as third-party dialects.
Does SQLDelight integrate with Kotlin coroutines?
Yes. Its coroutines extension can expose a query as a Flow that emits updated results when queried database data changes.
What the maker publishes
- Compile-time checks
- It verifies database schemas, SQL statements, and migrations at compile time. source
- Database dialects
- Documented dialects include SQLite, MySQL, PostgreSQL, and experimental HSQL/H2, with third-party CockroachDB, DB2, and Oracle dialects listed. source
- Dialect choices
- The current Gradle documentation lists SQLite dialect modules from versions 3.18 through 3.44 plus HSQL, MySQL, and PostgreSQL modules. source
- Documentation depth
- The generated API reference exposes separate modules for drivers, compiler, Gradle plugin, dialects, migrations, coroutines, RxJava, paging, JSON, and adapters. source
- Extensibility
- The project documents creating a custom driver outside its repository by depending on the runtime artifact. source
- Generated database API
- A Gradle generation task creates the database interface and Kotlin sources from .sq files. source
- Governance change
- Commonhaus announced on June 17, 2026 that SQLDelight joined as a member project after originating at Square and later Block under the lysine.dev banner. source
- Gradle integration
- The Gradle plugin lets projects register databases and select a dialect dependency such as sqlite-3-24-dialect. source
- IDE features
- Its IDE features include SQL autocomplete and refactoring support. source
- IDE plugin
- The documentation includes an IntelliJ Plugin section for SQLDelight. source
- IDE plugin distribution
- Development snapshots include an IDE plugin ZIP through Sonatype's Central Portal snapshots repository, while alpha and EAP IntelliJ channels are also documented. source
- IDE tooling
- The project provides SQL autocomplete and refactoring support in the IDE. source
- Independent documentation example
- JetBrains' Kotlin Multiplatform tutorial uses SQLDelight to generate shared database code and separate Android and iOS driver factories. source
- Integrations
- The docs provide extensions for Kotlin coroutines, RxJava, and AndroidX Paging, alongside a Gradle plugin. source
- JVM database connections
- The overview lists MySQL and PostgreSQL on JVM, with JDBC and R2DBC variants shown for supported dialects. source
- Latest release
- GitHub lists SQLDelight 2.4.1 released on October 6, 2026. source
- Licence
- The repository is licensed under the Apache License 2.0 and includes the standard no-warranty language. source
- Licensing
- The GitHub project page lists the Apache-2.0 license. source
- Limit: snapshot complexity
- An independent technical review notes that snapshot documentation is published separately and that the IDE plugin is described as a snapshot artifact rather than a released compiler-pinned build. source
- Maintainer transition
- Jake Wharton wrote that SQLDelight and related projects moved away from single-company stewardship to Commonhaus and lysine.dev in June 2026. source
- Maven publication
- Maven Repository lists app.cash.sqldelight:core as shared code for the Gradle and IntelliJ plugins and identifies its licence as Apache 2.0. source
- Migration checks
- The Gradle verifySqlDelightMigration task applies migrations to stored schema databases and checks that they reach the latest schema. source
- Migrations
- The compiler validates database migrations, and the Gradle tooling includes migration generation and verification tasks. source
- Native driver limit
- NativeSqliteDriver uses separate reader and transaction pools, and one transaction cannot be operated from multiple threads. source
Checked against the maker's pages on 15 Oct 2026.