SQLDelight

Kotlin Multiplatform SQL library that generates type-safe Kotlin APIs from .sq SQL files. Unlike ORMs that abstract SQL, SQLDelight writes actual SQL — you write SQL queries, SQLDelight generates Kotlin. Supports Android (Room alternative), iOS, JVM, and JavaScript. Compile-time verified SQL with migration support. Favored for KMP projects that need shared database logic across platforms.

Evaluated Mar 06, 2026 (0d ago) v2.0+
Homepage ↗ Repo ↗ Developer Tools kotlin multiplatform sqlite sql codegen android ios jvm cash-app
⚙ Agent Friendliness
65
/ 100
Can an agent use this?
🔒 Security
84
/ 100
Is it safe for agents?
⚡ Reliability
80
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
82
Error Messages
80
Auth Simplicity
95
Rate Limits
95

🔒 Security

TLS Enforcement
90
Auth Strength
82
Scope Granularity
80
Dep. Hygiene
88
Secret Handling
82

Local SQLite library — no network exposure. Compile-time SQL prevents SQL injection. SQLCipher integration for encryption. Cash App maintains.

⚡ Reliability

Uptime/SLA
85
Version Stability
80
Breaking Changes
72
Error Recovery
84
AF Security Reliability

Best When

You're building a Kotlin Multiplatform app (Android + iOS) and want shared database logic with type-safe SQL rather than ORM abstractions.

Avoid When

You're building JVM-only server-side apps — use Room (Android), Exposed (server), or JOOQ (type-safe SQL on JVM) instead.

Use Cases

  • Share database schema and queries across Android and iOS in Kotlin Multiplatform agent apps using SQLDelight's common SQL module
  • Write raw SQL with compile-time verification — SQLDelight parses .sq files and generates Kotlin type-safe query functions for agent data access
  • Use SQLDelight's coroutine extensions for reactive query streams — queries return Flow<List<T>> that emit on data changes
  • Manage cross-platform schema migrations with SQLDelight's migration files and automatic migration verification
  • Use SQLDelight's IntelliJ plugin for SQL auto-complete, go-to-definition, and rename refactoring in .sq files

Not For

  • Non-SQLite databases — SQLDelight targets SQLite (and PostgreSQL experimental); use Exposed or JOOQ for PostgreSQL/MySQL on JVM
  • Teams that prefer ORM-style entity mapping — SQLDelight requires writing SQL; use Room or Exposed if you prefer declarative entity definitions
  • Server-side heavy CRUD apps without KMP requirements — Exposed or JOOQ are more ergonomic for JVM-only server backends

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Database library — no authentication. SQLite encryption via SQLCipher integration available.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Cash App open source project. Apache 2.0 license.

Agent Metadata

Pagination
cursor
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • SQLDelight 2.0 is a major rewrite with breaking changes from 1.x — package names, Gradle plugin API, and dialect configuration all changed; check migration guide before upgrading
  • The IntelliJ plugin is required for IDE support — without it, .sq files are plain text with no autocomplete or type checking in the IDE
  • SQLDelight generates code into build/ directory — the generated package must be added as a source set in Gradle for IDE recognition
  • Coroutine extensions require the sqldelight-coroutines-extensions artifact separately — forgetting this means asQueryFlow() is not available
  • Schema migrations require exact sequential versioning (1.sqm, 2.sqm, etc.) — gaps in migration version numbers cause migration verification failure
  • SQLDelight's Flow queries emit once immediately on collection, then on data changes — if you need current data only once, use executeAsList() not asFlow() to avoid unnecessary subscriptions

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for SQLDelight.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered