SQLite.jl icon indicating copy to clipboard operation
SQLite.jl copied to clipboard

Open flags

Open rongcuid opened this issue 3 years ago • 2 comments

Please allow open flags to be specified for SQLite.DB(). I do not necessarily want to create a new file if path does not exist.

rongcuid avatar Nov 29 '22 18:11 rongcuid

https://github.com/JuliaPackaging/Yggdrasil/pull/5944 has been merged.

Now you can use URI file name to open SQLite database and specify the mode.

julia> db = SQLite.DB("file:test.db?mode=ro")
ERROR: SQLiteException("unable to open database file")

julia> db = SQLite.DB("file:test.db?mode=rwc")
SQLite.DB("file:test.db?mode=rwc")

metab0t avatar Dec 04 '22 11:12 metab0t

Related - https://stackoverflow.com/questions/64411855/how-to-open-an-sqlite-database-readonly-in-julia

alhirzel avatar Dec 07 '22 22:12 alhirzel