feat: add URI filename support #670
Open
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 #650
This code was generated with VS Code Copilot agent and Sonnet-4.5.
I think it did its job quite well.
Generated PR message below
Add SQLite URI filename support
Implements support for SQLite URI filenames across CLI and Python API (fixes #650).
Changes
sqlite_utils/db.py:
Database.__init__()to detect URI filenames (strings starting with ) and passuri=Trueparameter tosqlite3.connect()sqlite_utils/cli.py:
DatabasePathclass extendingclick.Pathto handle URI filenamesDatabasePathtests/test_uri.py:
Documentation:
Usage
CLI:
Python API:
Testing
All existing tests pass. Added 13 new tests covering URI functionality. Type checking passes with mypy.
📚 Documentation preview 📚: https://sqlite-utils--670.org.readthedocs.build/en/670/