janet-lang / janet-lang/sqlite3
Read-only connections possible?
- Dominant language
- C
- Stars
- 62
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Is it currently possible to create a read-only connection to a sqlite DB file?
I have zero experience with the C programming language, but from what I understand it should be possible by either:
1. Adding the `SQLITE_OPEN_READONLY` flag.[^1]
2. Supporting uri filenames (i.e. `file:/path/to/db.sqlite`), to which the user can then add a `mode=ro` query parameter so the given example would become `file:/path/to/db.sqlite?mode=ro`.[^2]
[^1]: https://sqlite.org/c3ref/open.html
[^2]: https://sqlite.org/uri.html
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the repository's SQLite connection entry point and the SQLite open documentation linked in the issue. Determine whether read-only access should use SQLITE_OPEN_READONLY or URI filenames with mode=ro; done means callers can create a read-only connection and writes are prevented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, sqlite
- Domain
- database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100