fix(db): use separate DSN for both drivers

This commit is contained in:
sentriz
2025-12-05 17:52:29 +01:00
parent b67c1c14d2
commit 469649935e
13 changed files with 75 additions and 52 deletions

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
//go:build nowasm
package deps
import (
"net/url"
// Cgo database
_ "github.com/mattn/go-sqlite3"
// Cgo tagger
"go.senan.xyz/gonic/tags/ffprobe"
)
//nolint:gochecknoglobals
var TagReader = ffprobe.Reader{}
// DSNOptions returns SQLite DSN options for the mattn driver
func DBDriverOptions() url.Values {
return url.Values{
"_busy_timeout": {"30000"},
"_journal_mode": {"WAL"},
"_foreign_keys": {"true"},
}
}