sqlc vs SQLDelight
sqlc
sqlc.devSQLDelight
sqldelight.github.ioSide by side
| Figure | sqlc | SQLDelight |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | Yes |
| Web | — | Yes |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| iOS | — | Yes |
| Android | — | Yes |
| API | — | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 2 | 2 |
| Spec score · Code Generators | 7.6 (#23) | 8.4 (#8) |
| Purpose | sqlc generates fully type-safe, idiomatic code from SQL queries. | SQLDelight generates typesafe Kotlin APIs from SQL statements. |
| Supported databases | The documented language support matrix covers MySQL, PostgreSQL, and SQLite. | Official dialects cover SQLite, MySQL, PostgreSQL, and experimental HSQL/H2, with third-party CockroachDB, DB2, and Oracle dialects listed. |
Plans
In their own words
sqlc
sqlc is a free command-line tool that turns SQL queries into type-safe application code. You write queries, run sqlc, and call the generated methods from application code through type-safe interfaces. Its documented database matrix covers MySQL, PostgreSQL, and SQLite. Official generators are available for Go, Kotlin, Python, and TypeScript; Go is stable, while Kotlin, Python, and TypeScript are marked beta for MySQL and PostgreSQL. Plugins allow additional languages, with community plugins listed for C#, F#, Java, PHP, Ruby, Zig, Python, and Rust. The sqlc vet command checks queries against configured rules, and sqlc verify checks whether schema changes break existing queries and generated code. Installation options include prebuilt Linux, macOS, and Windows downloads, package managers, Go, and Docker. sqlc Cloud can create short-lived hosted databases for analysis and linting, with managed databases described as read-only.
SQLDelight
SQLDelight generates typesafe Kotlin APIs from SQL statements and checks database schemas, SQL statements, and migrations at compile time. Its IDE features include SQL autocomplete and refactoring support. Documented database dialects include SQLite, MySQL, and PostgreSQL; HSQL and H2 are experimental, while CockroachDB, DB2, and Oracle dialects are listed as third-party options. The JVM connection overview lists MySQL and PostgreSQL, with JDBC and R2DBC variants shown for supported dialects. The project 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 the queried data changes. The Gradle verifySqlDelightMigration task applies migrations to stored schema databases and checks whether they reach the latest schema. SQLDelight is open source under the Apache-2.0 license and has a free listing at free, with no paid tiers stated. Its listed platforms are Android, API, iOS, Linux, macOS, web, and Windows.