EVERYTHING XIAOMI
Get listed

SQLDelight

SQLDelight generates Kotlin APIs from SQL statements and checks schemas, queries, and migrations at compile time.

Place
#1 of 33
Score
7.9
SQLDelight's website

What SQLDelight is

SQLDelight generates Kotlin APIs from SQL statements and checks schemas, queries, and migrations at compile time. That makes it a fit for projects that want database definitions and SQL checked as part of the build. Its IDE support includes SQL autocomplete and refactoring. Documented dialects cover SQLite, MySQL, and PostgreSQL; HSQL and H2 are experimental, while CockroachDB, DB2, and Oracle are available through third-party dialects. For JVM connections, the overview lists MySQL and PostgreSQL with JDBC and R2DBC variants for supported dialects. A Gradle plugin and extensions for Kotlin coroutines, RxJava, and AndroidX Paging are also provided. The coroutines extension can expose queries as Flows that emit updated results when queried data changes. A Gradle migration task checks whether applying migrations to stored schema databases reaches the latest schema. SQLDelight is free and open source under the Apache-2.0 license, with support listed for Android, API, iOS, Linux, macOS, web, and Windows.

Good

  • Checks schemas, statements, and migrations at compile time
  • IDE support includes SQL autocomplete and refactoring
  • Provides coroutines, RxJava, and AndroidX Paging extensions
  • Free and open source

Watch out

  • HSQL and H2 dialects are experimental
  • CockroachDB, DB2, and Oracle dialects are third-party

Who it suits

SQLDelight suits Kotlin developers who want compile-time checks for SQL and database migrations. It may also fit projects using the listed database dialects and Kotlin integrations.

Verdict

SQLDelight brings SQL validation, Kotlin code generation, and IDE support together for database-focused Kotlin development. Check dialect availability and maturity against your database before choosing it.

Plans and prices

From SQLDelight's own pricing page, checked 15 Oct 2026.

All about pricing
PlanPriceWhat it gives you
Open-source SQLDelightFreeApache-2.0 licensed Kotlin library · no hosted service or paid tiers stated
SQLDelightFreeOpen-source Kotlin SQL code generation library · no paid tiers stated

The facts

Each one read from SQLDelight's own pages, with the date it was checked.

What it does

Compile-time checks
It verifies database schemas, SQL statements, and migrations at compile time.checked 4 Oct 2026
Database dialects
Documented dialects include SQLite, MySQL, PostgreSQL, and experimental HSQL/H2, with third-party CockroachDB, DB2, and Oracle dialects listed.checked 4 Oct 2026
Dialect choices
The current Gradle documentation lists SQLite dialect modules from versions 3.18 through 3.44 plus HSQL, MySQL, and PostgreSQL modules.checked 15 Oct 2026
Documentation depth
The generated API reference exposes separate modules for drivers, compiler, Gradle plugin, dialects, migrations, coroutines, RxJava, paging, JSON, and adapters.checked 15 Oct 2026
Extensibility
The project documents creating a custom driver outside its repository by depending on the runtime artifact.checked 15 Oct 2026
Generated database API
A Gradle generation task creates the database interface and Kotlin sources from .sq files.checked 15 Oct 2026
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.checked 15 Oct 2026
Gradle integration
The Gradle plugin lets projects register databases and select a dialect dependency such as sqlite-3-24-dialect.checked 15 Oct 2026
IDE features
Its IDE features include SQL autocomplete and refactoring support.checked 4 Oct 2026
IDE plugin
The documentation includes an IntelliJ Plugin section for SQLDelight.checked 4 Oct 2026
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.checked 15 Oct 2026
IDE tooling
The project provides SQL autocomplete and refactoring support in the IDE.checked 15 Oct 2026
Independent documentation example
JetBrains' Kotlin Multiplatform tutorial uses SQLDelight to generate shared database code and separate Android and iOS driver factories.checked 15 Oct 2026
Integrations
The docs provide extensions for Kotlin coroutines, RxJava, and AndroidX Paging, alongside a Gradle plugin.checked 4 Oct 2026
JVM database connections
The overview lists MySQL and PostgreSQL on JVM, with JDBC and R2DBC variants shown for supported dialects.checked 4 Oct 2026
Latest release
GitHub lists SQLDelight 2.4.1 released on October 6, 2026.checked 15 Oct 2026
Licence
The repository is licensed under the Apache License 2.0 and includes the standard no-warranty language.checked 15 Oct 2026
Licensing
The GitHub project page lists the Apache-2.0 license.checked 4 Oct 2026
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.checked 15 Oct 2026
Maintainer transition
Jake Wharton wrote that SQLDelight and related projects moved away from single-company stewardship to Commonhaus and lysine.dev in June 2026.checked 15 Oct 2026
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.checked 15 Oct 2026
Migration checks
The Gradle verifySqlDelightMigration task applies migrations to stored schema databases and checks that they reach the latest schema.checked 4 Oct 2026
Migrations
The compiler validates database migrations, and the Gradle tooling includes migration generation and verification tasks.checked 15 Oct 2026
Native driver limit
NativeSqliteDriver uses separate reader and transaction pools, and one transaction cannot be operated from multiple threads.checked 15 Oct 2026
The full review of SQLDelight

SQLDelight generates type-safe Kotlin APIs from SQL statements, making it a strong fit for Kotlin developers who want database errors caught during compilation. Its combination of schema checks, migration verification, and IDE support suits database-focused projects, provided its dialect support matches your database.

Overview

SQLDelight treats SQL as the source for generated Kotlin APIs, rather than asking developers to build database access around loosely checked strings. It checks schemas, statements, and migrations at compile time, which can catch problems before they reach runtime. The trade-off is that its value depends on using Kotlin and a supported database dialect; it is not a general-purpose code generator for other languages.

The project is open source under Apache-2.0 and has no paid tiers. Its documentation covers SQLite, MySQL, and PostgreSQL, plus experimental HSQL/H2 dialects and third-party CockroachDB, DB2, and Oracle dialects. Experimental and third-party options merit more caution than the documented core dialects.

Key features

  • Compile-time validation: Checks schemas, SQL statements, and migrations. This is useful for teams that want database mistakes surfaced during development, though it does not remove the need to choose a suitable dialect.
  • Generated Kotlin APIs: Turns SQL statements into type-safe Kotlin APIs, a direct match for Kotlin applications and a poor fit for projects whose application code is in another language.
  • IDE support: SQL autocomplete and refactoring support, along with an IntelliJ plugin, help keep SQL work inside the development environment.
  • Migration verification: The Gradle verifySqlDelightMigration task applies migrations to stored schema databases and checks whether they reach the latest schema. That gives teams a concrete way to validate schema evolution.
  • Reactive and platform integrations: Extensions cover Kotlin coroutines, RxJava, and AndroidX Paging. The coroutines extension can expose queries as Flows and emit updated results when underlying database data changes.
  • JVM connections: MySQL and PostgreSQL connections are covered for the JVM, with JDBC and R2DBC variants shown for supported dialects.

Pricing

SQLDelight costs free. The free plan is the open-source Kotlin SQL code generation library, and no paid tiers are stated. That makes it accessible for individual developers and teams alike, without a paid plan to unlock the core library; there are no paid-plan seat or usage terms to weigh.

Platforms

SQLDelight is listed for Android, API, iOS, Linux, macOS, web, and Windows. Its supported language is Kotlin, so the platform breadth does not make it a fit for non-Kotlin codebases. The documented IntelliJ plugin and Gradle plugin are relevant to teams building in that ecosystem.

Who it's for

Choose SQLDelight if you build Kotlin software and want SQL-backed APIs, compile-time checks, and migration verification in the development workflow. It is particularly compelling when reactive query updates or integrations such as AndroidX Paging matter. Look elsewhere if your project needs generated code in a language other than Kotlin, or if its database depends on an experimental or third-party dialect you are not prepared to rely on.

Pros and cons

  • Pro: Compile-time checks cover schemas, statements, and migrations, helping catch database issues before runtime.
  • Pro: SQL autocomplete, refactoring support, and an IntelliJ plugin bring database work into the IDE.
  • Pro: Coroutine Flow support can emit updated query results when database data changes.
  • Pro: The Apache-2.0 project is free, with no paid tiers stated.
  • Con: Generated APIs are for Kotlin, limiting its usefulness in other language ecosystems.
  • Con: HSQL/H2 support is experimental, while CockroachDB, DB2, and Oracle dialects are third-party options; teams needing these databases should account for that distinction.

Alternatives

For another free, open-source generator, quicktype is an option; its listed platforms include API, Linux, macOS, web, and Windows.

Fern offers a free tier with 10 team members, 1,000 pages, 250 AI credits per month, 2,000 page generations per month, and one site, making it a separate option for readers comparing generator tools with a defined free allowance.

Hygen is a free code generator distributed through npm, Homebrew, npx, and standalone binaries. Angular CLI is another free option, with no paid plans or usage limits stated on its official pages.

JHipster is a free, open-source development platform. Nx may suit teams seeking a broader workflow with a free Hobby tier: 50,000 monthly-reset credits, five contributors, 10 concurrent CI connections, and community support.

For API-specific generation, OpenAPI Generator generates API clients, server stubs, documentation, and configurations. TypeSpec is a free, open-source, Microsoft-built, community-supported project.

Browse the Code Generators and Mobile Databases lists for more options.

Verdict

SQLDelight is an easy recommendation for Kotlin teams that want SQL to generate type-safe APIs and want schema and migration problems caught at compile time. Its free, open-source model and IDE and reactive-query support make a focused package. Choose another tool if you need non-Kotlin output, or treat the fit cautiously when your database relies on an experimental or third-party dialect.

Getting started

  1. Visit https://sqldelight.github.io/sqldelight/
  2. Use the Gradle plugin in your project.
  3. Write SQL statements for the database dialect you use and generate Kotlin APIs.
  4. Use the IDE support for SQL autocomplete and refactoring.
  5. For migration validation, run the Gradle verifySqlDelightMigration task against stored schema databases.

Questions

How much does SQLDelight cost?

The listed plan is free at no cost, and no paid tiers are stated.

Which database dialects are documented?

SQLite, MySQL, and PostgreSQL are documented; HSQL and H2 are experimental. CockroachDB, DB2, and Oracle dialects are listed as third-party options.

Which JVM database connections are covered?

The overview lists MySQL and PostgreSQL on JVM, with JDBC and R2DBC variants shown for supported dialects.

What integrations does SQLDelight provide?

The docs provide a Gradle plugin and extensions for Kotlin coroutines, RxJava, and AndroidX Paging.

What license does SQLDelight use?

The GitHub project page lists the Apache-2.0 license.

Which platforms are listed for SQLDelight?

Android, API, iOS, Linux, macOS, web, and Windows are listed.

Alternatives to SQLDelight

All alternatives
  1. 1

    Fern

    Free planOpen sourceWebAPILinuxmacOS
    7.8Free plan
  2. 2

    Swagger Codegen

    Free planOpen sourceWebAPILinuxmacOS
    7.6Free plan
  3. 3

    APIMatic

    Free planWebAPIExtensionLinux
    7.4From $99 a month
  4. 4

    Symfony MakerBundle

    Free planOpen sourceAPILinuxmacOSSelf-hosted
    7.4Free plan
  5. 5quicktype logo

    quicktype

    Free planWebAPILinuxmacOS
    7.3From $19 a month
  6. 6Nx logo

    Nx

    Free planWebLinuxmacOSSelf-hosted
    7.2From $29 a month