FREEDOM251

Freedom251 › Code Generators

SQLDelight

Free plan Open source AndroidAPIiPhoneLinuxMacSelf-hosted+2

Visit SQLDelight Alternatives Pricing

SQLDelight's own site

What SQLDelight is

SQLDelight generates Kotlin APIs from SQL statements and checks schemas, statements, and migrations at compile time. It includes IDE support for SQL autocomplete and refactoring, along with a Gradle plugin and extensions for Kotlin coroutines, RxJava, and AndroidX Paging. Its documented database dialects include SQLite, MySQL, and PostgreSQL; HSQL and H2 are experimental, and third-party dialects are listed for CockroachDB, DB2, and Oracle. For JVM database connections, the overview covers MySQL and PostgreSQL, with JDBC and R2DBC variants shown for supported dialects. The coroutines extension can expose a query as a Flow and emit updated results when the relevant database data changes. A Gradle migration task checks whether migrations applied to stored schema databases reach the latest schema. SQLDelight is free and open source under the Apache-2.0 license. Listed platforms are Android, API, iOS, Linux, macOS, web, and Windows.

Who it suits

SQLDelight suits Kotlin developers who want SQL, schemas, and migrations checked during compilation. It also fits projects that need the listed database dialects or Kotlin integrations.

What it does well

  • Checks schemas, SQL, and migrations at compile time
  • IDE support includes SQL autocomplete and refactoring
  • Coroutines can emit query updates as a Flow
  • Free and open source under Apache-2.0

What to know first

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

Plans

PlanBilled and limitsPrice
SQLDelightOpen-source Kotlin SQL code generation library · no paid tiers statedFree
Open-source SQLDelightApache-2.0 licensed Kotlin library · no hosted service or paid tiers statedFree

As sqldelight.github.io lists them, read 4 Oct 2026. The maker's own page has the final word.

Getting started

  1. Visit the SQLDelight website.
  2. Add the SQLDelight Gradle plugin to a Kotlin project.
  3. Choose a documented or listed dialect for the project.
  4. Use the IDE plugin for SQL autocomplete and refactoring.
  5. Add the coroutine, RxJava, or AndroidX Paging extension if needed.

SQLDelight is a Kotlin library that generates typed APIs from SQL. It suits Kotlin teams that want database changes checked before runtime; its appeal depends on the database dialects their projects need.

Overview

SQLDelight keeps SQL at the center of database access while generating Kotlin APIs around it. Compile-time checks cover schemas, statements, and migrations, which can help catch mistakes earlier in development. The trade-off is a narrow language fit: it is for Kotlin projects, not teams seeking a general-purpose generator.

The project is open source under Apache-2.0 and has no paid tiers. Its documented dialects include SQLite, MySQL, and PostgreSQL; HSQL and H2 are experimental, while CockroachDB, DB2, and Oracle dialects are third-party. That distinction matters: teams using experimental or third-party choices should verify that they meet their project’s needs.

Key features

  • Compile-time database checks: SQLDelight verifies schemas, SQL statements, and migrations at compile time. That makes it a useful fit for Kotlin developers who want errors surfaced before an application runs, but it does not remove the need to choose a suitable dialect.
  • SQL-to-Kotlin generation: Generated APIs give Kotlin code a typed interface to SQL statements. Projects in other languages will need a different tool.
  • IDE assistance: SQL autocomplete and refactoring support, along with an IntelliJ plugin section in the documentation, can make SQL work more integrated into the Kotlin development workflow.
  • Migration verification: The Gradle verifySqlDelightMigration task applies migrations to stored schema databases and checks that they reach the latest schema. This gives teams a concrete way to catch migration problems during development.
  • Reactive and library integrations: Extensions cover Kotlin coroutines, RxJava, and AndroidX Paging. The coroutines extension can expose a query as a Flow and emit updated results when queried data changes, a practical option for applications that need reactive database results.
  • JVM connections: The overview covers MySQL and PostgreSQL on JVM, with JDBC and R2DBC variants shown for supported dialects. Those connections add flexibility for Kotlin JVM projects, while dialect support remains the deciding constraint.

Pricing

SQLDelight: free. The open-source Kotlin SQL code generation library has no paid tiers stated, so it is a straightforward choice for individual developers and teams that want these capabilities without a software subscription. Its cost-free model does not broaden its Kotlin and dialect scope.

Platforms

SQLDelight lists Android, API, iOS, Linux, macOS, web, and Windows. It supports Kotlin; platform coverage makes it relevant across Kotlin application targets, but does not imply support for other programming languages.

Who it's for

Choose SQLDelight if your project uses Kotlin and you want SQL schemas, statements, and migrations checked during compilation, especially if its coroutines, RxJava, Paging, or Gradle integrations fit your workflow. Look elsewhere if you need generation for a different language or rely on a database whose dialect support is experimental or third-party and cannot meet your requirements.

Pros and cons

Pros

  • Checks schemas, statements, and migrations at compile time, helping catch database issues before runtime.
  • Open source with no paid tiers, so there is no software subscription to budget for.
  • Useful Kotlin integrations, including coroutines Flow queries, RxJava, AndroidX Paging, and a Gradle plugin.
  • Migration verification checks whether migrations bring stored schema databases up to the latest schema.

Cons

  • Kotlin-only generation rules it out for projects built around other languages.
  • Dialect support is uneven: HSQL and H2 are experimental, and CockroachDB, DB2, and Oracle are third-party choices.
  • No stated security certification or compliance standard is a consideration for buyers whose requirements depend on one.

Alternatives

quicktype is another free, open-source generator; consider it instead if its API, Linux, macOS, web, or Windows platform coverage better suits your project.

Angular CLI is a free choice for projects centered on its Linux, macOS, self-hosted, or Windows platforms rather than SQL-to-Kotlin generation.

Fern may suit teams looking for a generator with a free tier for up to 10 team members, 1,000 pages, 250 AI credits per month, 2,000 page generations per month, and one site.

Hygen is a free code generator distributed through npm, Homebrew, npx, and standalone binaries; choose it if that distribution model fits better.

JHipster is a free, open-source development platform, an alternative for teams seeking a broader platform rather than a Kotlin SQL library.

Nx may fit teams seeking a free hobby tier with 50,000 monthly credits, five contributors, and 10 concurrent CI connections, rather than SQL-focused Kotlin code generation.

OpenAPI Generator is a free, open-source option for generating API clients, server stubs, documentation, and configurations.

TypeSpec is a free open-source project built by Microsoft and supported by its community; consider it if that project better matches your generation needs.

Browse more options in Code Generators or Mobile Databases.

Verdict

SQLDelight is a strong choice for Kotlin developers who want typed database APIs and compile-time checks without a paid tier. Its integrations and migration verification add practical value, but language and dialect boundaries are decisive: teams outside Kotlin, or dependent on an experimental or third-party dialect, should look elsewhere.

Verdict

SQLDelight combines Kotlin code generation with compile-time database checks and several IDE and library integrations. Check its dialect options against your database, especially if you need one of the experimental or third-party choices.

Questions

How much does SQLDelight cost?

The listed plan is free. Its pricing model is open source, and no paid tiers are stated.

Which languages and platforms are listed?

Kotlin is the supported language. Platforms listed are Android, API, iOS, Linux, macOS, web, and Windows.

Which database dialects are available?

Documented dialects include SQLite, MySQL, and PostgreSQL. HSQL and H2 are experimental; CockroachDB, DB2, and Oracle are third-party dialects.

What does SQLDelight check during compilation?

It verifies database schemas, SQL statements, and migrations at compile time.

Does it provide IDE support and integrations?

The project includes an IntelliJ plugin section, with SQL autocomplete and refactoring support. It also provides 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.

Facts from SQLDelight's own pages

Compile-time checks
It verifies database schemas, SQL statements, and migrations at compile time. · sqldelight.github.io, 4 Oct 2026
Database dialects
Documented dialects include SQLite, MySQL, PostgreSQL, and experimental HSQL/H2, with third-party CockroachDB, DB2, and Oracle dialects listed. · sqldelight.github.io, 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. · sqldelight.github.io, 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. · sqldelight.github.io, 15 Oct 2026
Extensibility
The project documents creating a custom driver outside its repository by depending on the runtime artifact. · sqldelight.github.io, 15 Oct 2026
Generated database API
A Gradle generation task creates the database interface and Kotlin sources from .sq files. · kotlinlang.org, 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. · commonhaus.org, 15 Oct 2026
Gradle integration
The Gradle plugin lets projects register databases and select a dialect dependency such as sqlite-3-24-dialect. · sqldelight.github.io, 15 Oct 2026
IDE features
Its IDE features include SQL autocomplete and refactoring support. · sqldelight.github.io, 4 Oct 2026
IDE plugin
The documentation includes an IntelliJ Plugin section for SQLDelight. · sqldelight.github.io, 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. · sqldelight.github.io, 15 Oct 2026
IDE tooling
The project provides SQL autocomplete and refactoring support in the IDE. · sqldelight.github.io, 15 Oct 2026
Independent documentation example
JetBrains' Kotlin Multiplatform tutorial uses SQLDelight to generate shared database code and separate Android and iOS driver factories. · kotlinlang.org, 15 Oct 2026
Integrations
The docs provide extensions for Kotlin coroutines, RxJava, and AndroidX Paging, alongside a Gradle plugin. · sqldelight.github.io, 4 Oct 2026
JVM database connections
The overview lists MySQL and PostgreSQL on JVM, with JDBC and R2DBC variants shown for supported dialects. · sqldelight.github.io, 4 Oct 2026
Latest release
GitHub lists SQLDelight 2.4.1 released on October 6, 2026. · github.com, 15 Oct 2026
Licence
The repository is licensed under the Apache License 2.0 and includes the standard no-warranty language. · github.com, 15 Oct 2026
Licensing
The GitHub project page lists the Apache-2.0 license. · github.com, 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. · hysenlabs.com, 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. · jakewharton.com, 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. · mvnrepository.com, 15 Oct 2026
Migration checks
The Gradle verifySqlDelightMigration task applies migrations to stored schema databases and checks that they reach the latest schema. · sqldelight.github.io, 4 Oct 2026
Migrations
The compiler validates database migrations, and the Gradle tooling includes migration generation and verification tasks. · sqldelight.github.io, 15 Oct 2026
Native driver limit
NativeSqliteDriver uses separate reader and transaction pools, and one transaction cannot be operated from multiple threads. · sqldelight.github.io, 15 Oct 2026

Where SQLDelight stands on Freedom251

Look at these too