This commit is contained in:
Nazar Kanaev
2024-09-25 11:01:03 +01:00
parent f71792d6a5
commit 2a4d974965
6 changed files with 33 additions and 34 deletions

View File

@@ -14,10 +14,10 @@ type Storage struct {
func New(path string) (*Storage, error) {
if pos := strings.IndexRune(path, '?'); pos == -1 {
params := "_journal=WAL&_sync=NORMAL&_busy_timeout=5000&cache=shared"
log.Printf("opening db with params: %s", params)
path = path + "?" + params
}
params := "_journal=WAL&_sync=NORMAL&_busy_timeout=5000&cache=shared"
log.Printf("opening db with params: %s", params)
path = path + "?" + params
}
db, err := sql.Open("sqlite3", path)
if err != nil {