Skip to content

Fix database_exists() for named in-memory SQLite URIs - #840

Open
Cherith1222 wants to merge 1 commit into
kvesteri:masterfrom
Cherith1222:fix/542-sqlite-named-memory
Open

Cherith1222 wants to merge 1 commit into
kvesteri:masterfrom
Cherith1222:fix/542-sqlite-named-memory

Conversation

@Cherith1222

Copy link
Copy Markdown

database_exists() treated a named in-memory SQLite URI (file:name?mode=memory&uri=true) as a filesystem path, so the check in #542 did not succeed.

:memory: and an omitted database name already count as existing. This applies the same result when the database name is a file: URI, SQLAlchemy URI mode is on, and SQLite's mode is memory.

Fixes #542

Cherith reviewed this diff and confirmed it with the person who helped draft it.
Drafted with Cursor. Model: Grok 4.7.

A file URI with mode=memory has no filesystem path, so the check reported it missing. (kvesteri#542)

AI-assisted (Cursor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Method database_exists() does not validate "named" in-memory SQLite database

1 participant