Drift vs SQLDelight
Drift
drift.simonbinder.euSQLDelight
sqldelight.github.ioSide by side
| Figure | Drift | SQLDelight |
|---|---|---|
| Price from | — | Free |
| Free plan | — | Yes |
| Free trial | — | — |
| Open source | — | Yes |
| Web | Yes | Yes |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| iOS | Yes | Yes |
| Android | Yes | Yes |
| API | — | Yes |
| Self-hosted | — | Yes |
| Plans published | 0 | 2 |
| Spec score · Mobile Databases | 7.6 (#20) | 8.3 (#5) |
| Migrations | Drift provides migration utilities, but developers need to write migrations when changing an existing database schema. | The compiler validates database migrations, and the Gradle tooling includes migration generation and verification tasks. |
| Platforms | Drift supports Android, iOS, Windows, Linux, macOS, and web through platform-specific database implementations. | The docs list SQLite support for Android, native iOS/macOS/Linux/Windows, JVM, JavaScript in browsers and Node, and multiplatform projects. |
| Reactive queries | Queries can be watched as auto-updating streams that emit when the underlying data changes. | The coroutines extension can expose a query as a Flow and emit updated results when the queried database data changes. |
| What it does | Drift is a reactive persistence library for relational data in Dart and Flutter applications. | SQLDelight converts SQL statements into type-safe Kotlin APIs and checks schemas, queries, and migrations during compilation. |
Plans
In their own words
Drift
Drift is a reactive persistence library for relational data in Dart and Flutter applications. It maps database rows to selected objects and offers type-safe queries; watched queries can emit updates as underlying data changes. Its SQL parser and analyzer can validate queries at compile time and generate Dart row code, using drift_dev and build_runner for code generation. Drift supports SQLite and has packages for PostgreSQL and libSQL connections, including local-copy synchronization with libSQL. Developers can use migration utilities, but need to write migrations when changing schemas used by existing apps. Encrypted databases are possible through SQLite3MultipleCiphers with a NativeDatabase executor, provided the app sets an encryption key. Documented implementations cover Android, iOS, Windows, Linux, macOS, and web. Some APIs, including date-time modification APIs, are SQLite-only with PostgreSQL. Full web support may require COOP/COEP security headers; Chrome on Android can have cross-tab persistence issues without them. Drift is free, and its documentation includes a DevTools extension page; questions and feedback can go to GitHub discussions.
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.