Skip to content

Fix database_exists() for SQLite URI connections - #827

Open
00200200 wants to merge 1 commit into
kvesteri:masterfrom
00200200:fix/sqlite-uri-database-exists
Open

00200200 wants to merge 1 commit into
kvesteri:masterfrom
00200200:fix/sqlite-uri-database-exists

Conversation

@00200200

@00200200 00200200 commented Sep 17, 2026

Copy link
Copy Markdown

Closes #824

database_exists() treated SQLite URI filenames like file:/tmp/db.sqlite as filesystem paths, so it always returned False after create_database() with uri=true. I resolve the real file path (and use it in drop_database() too), including file::memory: and query params.

Tested with:
pytest tests/functions/test_database.py::TestDatabaseSQLiteURI

Parse file: paths when uri=true so existence checks and drops
target the real database file instead of the URI string.
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.

database_exists() always returns False when a sqlite3 URI is used

1 participant