axiom-grdb

Provide type-safe SQLite access with GRDB for Swift apps.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/pradeepmouli/swift-template --skill axiom-grdb-pradeepmouli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axiom-grdb
Source: https://github.com/pradeepmouli/swift-template/tree/main/.agents/skills/axiom-grdb
Command: npx skills add https://github.com/pradeepmouli/swift-template --skill axiom-grdb-pradeepmouli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

GRDB provides direct, SQLite power with type-safety for Swift, enabling developers to write complex SQL, manage migrations, and implement reactive queries when needed, while retaining performance control.

Core Features & Use Cases

  • Complex joins and advanced SQL with type-safe mappings to Swift structs.
  • ValueObservation for reactive queries and SwiftUI integration.
  • DatabaseMigrator patterns for safe migrations and data transforms.
  • Performance profiling and debugging with EXPLAIN QUERY PLAN and database.trace.
  • Seamless drop-down from SQLiteData when advanced SQL is required.

Quick Start

Create a GRDB DatabaseQueue, register and run migrations, then start executing raw SQL or typed queries.

Frequently Asked Questions about axiom-grdb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run complex SQL joins with type-safe mappings in Swift?

You can execute complex SQL joins with type-safe mappings in Swift by using GRDB to map raw SQL query results directly to Swift structs. This ensures compile-time safety while retaining full access to advanced SQL features.

What is the best way to manage SQLite database migrations in Swift?

The best way to manage SQLite database migrations in Swift is using GRDB's DatabaseMigrator patterns. This provides safe, versioned schema migrations and data transforms, ensuring your database structure updates predictably without data loss.

How does ValueObservation work for reactive SQLite queries in SwiftUI?

ValueObservation in GRDB enables reactive SQLite queries by automatically observing database changes and updating SwiftUI views. When underlying rows change, the observation triggers UI updates, creating a seamless reactive data flow.

When should I use direct GRDB SQLite access instead of an ORM?

You should use direct GRDB SQLite access instead of an ORM like SQLiteData when you need complex joins, explicit migration management, or performance profiling. GRDB provides raw SQL control and EXPLAIN QUERY PLAN support for scenarios where ORMs are insufficient.

Can I profile SQLite query performance and trace execution in Swift?

Yes, you can profile SQLite query performance in Swift using GRDB's database.trace functionality and EXPLAIN QUERY PLAN support. This allows you to analyze query execution paths and optimize slow database operations effectively.