GRDB.swift Overview

A toolkit for SQLite databases, with a focus on application development

GRDB provides raw access to SQL and advanced SQLite features, because one sometimes enjoys a sharp tool. It has robust concurrency primitives, so that multi-threaded applications can efficiently use their databases. It grants your application models with persistence and fetching methods, so that you don't have to deal with SQL and raw database rows when you don't want to.

Compared to SQLite.swift or FMDB, GRDB can spare you a lot of glue code. Compared to Core Data or Realm, it can simplify your multi-threaded applications.

It comes with up-to-date documentation, general guides, and it is fast.

See Why Adopt GRDB? if you are looking for your favorite database library.

GRDB ships with:
  • Access to raw SQL and SQLite
  • Records: Fetching and persistence methods for your custom structs and class hierarchies.
  • Query Interface: A swift way to avoid the SQL language.
  • Associations: Relations and joins between record types.
  • WAL Mode Support: Extra performance for multi-threaded applications.
  • Migrations: Transform your database as your application evolves.
  • Database Observation: Observe database changes and transactions.
  • Swift Concurrency: try await your database (Xcode 13.2+).
  • Combine Support: Access and observe the database with Combine publishers.
  • RxSwift Support: Access and observe the database with RxSwift observables.
  • Full-Text Search
  • Encryption
  • Support for Custom SQLite Builds