projects
/
brackets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eac0dfd
)
Enable WAL to allow concurrent reads
author
Jacob Casper
<dev@jacobcasper.com>
Thu, 16 Apr 2020 23:28:38 +0000
(18:28 -0500)
committer
Jacob Casper
<dev@jacobcasper.com>
Fri, 17 Apr 2020 00:20:10 +0000
(19:20 -0500)
This journaling mode means that we won't have to lock for reads and can
manage DB locking only around writes.
db/db.go
patch
|
blob
|
blame
|
history
diff --git
a/db/db.go
b/db/db.go
index
1697648
..
3c04e68
100644
(file)
--- a/
db/db.go
+++ b/
db/db.go
@@
-12,7
+12,7
@@
type DB struct {
}
func New() (*DB, error) {
- db, err := sql.Open("sqlite3", "brackets.sqlite")
+ db, err := sql.Open("sqlite3", "brackets.sqlite
?_journal_mode=WAL&_foreign_keys=on
")
if err != nil {
return nil, err
}