Migrate from SQLite.swift to PureSwift/SQLite#9
Merged
Conversation
colemancda
force-pushed
the
feature/dependencies
branch
from
July 17, 2026 01:11
ba6ed2d to
a9468c2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the
stephencelis/SQLite.swiftdependency withPureSwift/SQLite.SQLite.swift+CSQLite(and the AndroidTARGET_OS_ANDROIDbranching) for a singlePureSwift/SQLitedependency, which wraps the system SQLite3 on Apple platforms and links an embedded SQLite (via swift-sqlcipher) everywhere else. No more per-platform product conditions.enum Bindinginstead of theAny-based protocol withas?casts; add stricttextValue/blobValueaccessors so.string/.datadecode only from their real storage classes.sqlite3_create_function_v2C-API registration (and itsSQLite3/CSQLiteimports) withConnection.createFunction.Connection(path:),.bindingon positional values,scalar(...)?.integer,row[...]?.textValue) and drop the now-redundant customrowDictionaries()(provided byPreparedStatement).mutatingcolumn builder, read-onlyConnectioninit, and theborrowing/consumingownership annotations required by the noncopyableConnection.CustomFunctionTests.swift's direct SQLite usage to the new API.Behavior is preserved — the migration is API-only.
Test plan
swift test— all 60 tests pass, including custom-function and app-managed R*Tree prefilter tests.BENCHMARK=1 swift test --filter DistancePerformanceBenchmarks— both distance benchmarks pass.