# stephencelis/SQLite.swift

A type-safe, Swift-language layer over SQLite3.

Repository: https://github.com/stephencelis/SQLite.swift
Canonical: https://ross.abutalabs.com/products/sqliteswift
Language: Swift
License: MIT
License Family: permissive
Topics: swift, sqlite
Last push: 2026-08-20T10:42:02+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 50, longevity 100
- inputs: {"age_days": 4351, "days_push": 13, "days_rel": 178, "gap_med": 133.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10188, forks 1611 (observed 2026-08-28T04:10:39.813002+00:00)

## What it is
A type-safe Swift-language layer over SQLite3 that provides compile-time confidence in SQL statement syntax and intent. It offers a pure-Swift interface with an expression builder, chainable lazy-executing queries, and automatically-typed data access.

## Use cases
- store structured app data locally on iOS or macOS
- query a SQLite database with type-safe Swift expressions
- run schema migrations for a local database
- use full-text search over a local SQLite database
- encrypt a local database with SQLCipher in Swift
- replace raw SQL strings with a compile-time checked query builder

## When to choose
- you are building a Swift app (iOS, macOS, or Linux) that needs local SQLite persistence
- you want compile-time safety for SQL queries instead of raw string SQL
- you need optional-aware Swift types mapped to nullable database columns
- you want SQLCipher encryption support via Swift Package Manager

## When to avoid
- you need a cross-platform ORM with server database backends like PostgreSQL or MySQL
- you are not developing in Swift
- you need an async/await-first or reactive database layer with heavy concurrency features
- you need a full-featured ORM with relationships, lazy loading, and change tracking

## Facets
- artifact type: library
- maturity: stable
- function: database, database-driver, orm
- domain: databases, developer-tools, mobile-development
- platform: cross-platform
- tags: sqlite, type-safe, swift, query-builder, sqlcipher, full-text-search, ios, macos, linux

## Member repositories
- stephencelis/SQLite.swift (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:39.813002+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:19:38.782330+00:00, confidence not recorded.
  - readme: https://github.com/stephencelis/SQLite.swift (fetched 2026-08-28T04:10:39.813002+00:00, sha 0a42be713666)
- Data as of 2026-08-30T08:39:29.467469+00:00.
