mirror of
https://github.com/immich-app/sqlite-libs.git
synced 2026-09-30 13:22:53 +08:00
ddc24b3a74e5faaebbe290091ad0f23830c858c1
SQLite Libraries
This repository bundles a custom SQLite build for use as a dependency in iOS and Android apps via SPM, JitPack, pub and CocoaPods. Included are:
- SQLite amalgamation, built with optimized settings and the following official extensions:
- snapshot
- fts5
- rtree
- math
- percentile
- geopoly
- carray
- series
- USearch vector extension (SIMD vector search and various distance metrics)
- SQLean's uuid extension (native UUID support, including UUIDv7)
- SQLean's text extension (QoL helpers that exist in PostgreSQL)
- GRDB (Swift SQLite driver, statically linked to custom SQLite)
- SQLiteData (Swift query builder, built on GRDB)
The dependencies are prepared via scripts/setup.sh, which downloads and organizes the relevant source code and adds a few shims.
Installation
Flutter (Drift)
dependency_overrides:
sqlite3_flutter_libs:
git:
url: https://github.com/immich-app/sqlite-libs
path: flutter
ref: <version>
Android (Room/Gradle)
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.immich-app.sqlite-libs:sqlite-android:<version>'
}
To use with Room:
Room.databaseBuilder(context, AppDatabase::class.java, "db")
.openHelperFactory(RequerySQLiteOpenHelperFactory())
.build()
iOS (Swift Package Manager)
Add to your Package.swift or Xcode project:
https://github.com/immich-app/sqlite-libs @ <version>
Languages
C
79.8%
Swift
9.8%
C++
8.2%
Java
2.1%