janet-lang / sqlite3

Bindings to sqlite for the Janet language.
MIT License
47 stars 14 forks source link

Read-only connections possible? #12

Open harryvederci opened 2 years ago

harryvederci commented 2 years ago

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