On this page
Overview
GRDB is a SQLite toolkit for Swift application development. It provides DatabaseQueue and DatabasePool, raw SQL, Codable records, a query interface, database observation, and schema migrations so low-level SQL and higher-level APIs can coexist.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Choose between DatabaseQueue or DatabasePool and mix SQL, records, and query APIs
Applications can open a DatabaseQueue or DatabasePool and use raw SQL, row/value fetches, FetchableRecord/PersistableRecord models, and the Swift query interface in the same database layer.
Sources: [2]
Observe database changes and evolve schemas through migrations
ValueObservation can publish database changes through Swift concurrency and other integrations, while migration support tracks schema evolution across application releases.
Sources: [2]
Best fit
Fits iOS applications that want direct SQLite capabilities with Swift ergonomics
It is useful for local-first applications and offline caches that want SQL flexibility together with Swift models, concurrency, and observation instead of a higher-level persistence stack.
Sources: [2]
Before adoption
Version 7.11.1 uses Swift tools 6.1, requires iOS 13+, and newer CocoaPods distribution is constrained
Package.swift uses Swift 6 mode and declares iOS 13, macOS 10.15, tvOS 13, and watchOS 7 minimums. The README documents a CocoaPods publishing issue for newer GRDB versions, making SwiftPM the straightforward path for current releases.
Official sources
- [1]groue/GRDB.swift — GitHub repository(2026-10-06)
- [2]GRDB 7.11.1 — README(2026-10-06)
- [3]GRDB 7.11.1 — Package.swift(2026-10-06)
- [4]GRDB 7.11.1 release(2026-10-06)
- [5]GRDB MIT license(2026-10-06)
Supplemental curator note
GRDB fits local-first iOS applications that want SQL flexibility together with Swift models, observation, and migrations. SwiftPM is the straightforward distribution path for current releases.
Try it in 3 steps
- 1
Add GRDB 7.11.1 with SwiftPM
Pin the reviewed release. GRDB 7.11.1 uses Swift tools 6.1 and supports iOS 13+.
.package(url: "https://github.com/groue/GRDB.swift.git", exact: "7.11.1") - 2
Open a SQLite database connection
Follow the README basic example and open SQLite through DatabaseQueue.
import GRDB let dbQueue = try DatabaseQueue(path: "/path/to/database.sqlite") - 3
Create a table and insert a row
Create schema and execute a parameterized insert inside a write transaction.
try dbQueue.write { db in try db.create(table: "player") { t in t.primaryKey("id", .text) t.column("name", .text).notNull() } try db.execute(sql: "INSERT INTO player (id, name) VALUES (?, ?)", arguments: ["1", "Arthur"]) }
Growth
Growth trends · Last 30 days
8,676 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 0
- Open PRs
- 7
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- sqlite
- database
- sql
- sql-builder
- grdb
- spm
- sqlite-databases
- database-observation
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Tauri111,593 Stars
2 shared tag(s) · 2 shared category(s)
Combine a web frontend and Rust native layer into desktop and mobile apps using system WebViews
Rust - Firebase Apple SDK6,926 Stars
4 shared tag(s) · 2 shared category(s)
integrate Firebase authentication, databases, messaging, Crashlytics, and other services into Apple apps
C++ - Lottie for iOS26,894 Stars
3 shared tag(s) · 2 shared category(s) · Same language
render After Effects JSON and .lottie vector animations natively on Apple platforms
Swift - Moya15,353 Stars
3 shared tag(s) · 2 shared category(s) · Same language
define API endpoints as typed targets and unify networking, stubs, and plugins
Swift - The Composable Architecture14,952 Stars
3 shared tag(s) · 2 shared category(s) · Same language
build composable SwiftUI and UIKit features around State, Action, Reducer, and Store
Swift - Nuke8,676 Stars
3 shared tag(s) · 2 shared category(s) · Same language
load, process, and cache remote images through ImagePipeline for SwiftUI and UIKit
Swift
Report incorrect information
Tell us if any listing information is incorrect or outdated.