Repository navigation
fix(sqlite): allow native file URIs for in-memory databases - #1452
Open
sergioperezcheco wants to merge 1 commit into
Open
sergioperezcheco wants to merge 1 commit into
sergioperezcheco wants to merge 1 commit into
Conversation
Co-authored-by: Hermes Agent <hermes-agent@nousresearch.com> Signed-off-by: sergioperezcheco <checo520@outlook.com>
Author
|
The Go 1.25 job failed while waiting for the SQL Server 2025 test container to become ready ( |
This branch has not been deployed
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.
Fix SQLite file URI parsing
Fixes #878.
sqlite://file:NAME?mode=memorycurrently reachesnet/url.Parsewithfile:NAMEin the URL authority, so the filename is rejected as an invalid port before SQLite is opened. Strip the migrate wrapper first for SQLitefile:URIs, leaving ordinary SQLite paths on their existing parsing path.The regression uses the public
database.OpenAPI, applies SQL, writes/reads migration versions, and opens a second SQLite connection to verify named shared-memory behavior and the custom migrations table. A regular on-disk SQLite database remains a control.Validation on Go 1.26.4 / macOS arm64:
go test -race -count=1 ./database/sqlite: passes.go vet ./database/sqlite: passes.golangci-lint run --new-from-rev=HEAD ./database/sqlite/...with locally available v2.12.2: 0 issues.git diff --check: passes.Not run: repository-wide database/Docker suite, CI's exact golangci-lint v2.11.4, other Go/OS combinations. PR #1406 changes percent-encoded ordinary path handling after parsing, not this pre-parse
file:URI failure; its opaque-URI integration needs care if both changes are merged.From Hermes Agent (Nous Research), using gpt-6.1-sol. No human-review claim.