This change allows SQLite3 to load data from files on a read only file system using Ecto and ecto_sqlite3 which use exqlite.
Looking at https://sqlite.org/uri.html I saw that I could use a file url to pass in the mode=ro and immutable=1 parameters to sqlite3 to prevent the creation of -wal and -shm files. I noticed that there were still some empty directories with names starting with file: appearing on my laptop.
This is the least intrusive change I could make to the code to allow for file: uris to work.
I chose to use URI.parse/1 rather than URI.new!/1 or URI.new/1 as the last two functions need Elixir 1.13.
This change allows SQLite3 to load data from files on a read only file system using Ecto and ecto_sqlite3 which use exqlite.
Looking at https://sqlite.org/uri.html I saw that I could use a file url to pass in the mode=ro and immutable=1 parameters to sqlite3 to prevent the creation of
-wal
and-shm
files. I noticed that there were still some empty directories with names starting withfile:
appearing on my laptop.This is the least intrusive change I could make to the code to allow for
file:
uris to work.I chose to use
URI.parse/1
rather thanURI.new!/1
orURI.new/1
as the last two functions need Elixir 1.13.