Commit 57019dd
Allow the use of a file: uri for a database (#225)
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.
Co-authored-by: Mike Stok <mstok@kineticcafe.com>1 parent adbe5a2 commit 57019dd
2 files changed
+70
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
437 | 439 | | |
438 | 440 | | |
439 | 441 | | |
440 | | - | |
441 | | - | |
442 | | - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
443 | 446 | | |
444 | 447 | | |
445 | 448 | | |
| |||
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
461 | | - | |
| 464 | + | |
| 465 | + | |
462 | 466 | | |
463 | 467 | | |
464 | 468 | | |
| |||
605 | 609 | | |
606 | 610 | | |
607 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
608 | 626 | | |
609 | 627 | | |
610 | 628 | | |
611 | 629 | | |
612 | | - | |
613 | | - | |
| 630 | + | |
| 631 | + | |
614 | 632 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
40 | 86 | | |
41 | 87 | | |
42 | 88 | | |
| |||
0 commit comments