Skip to content

Commit

Permalink
fix: sqlite3 config improvements
Browse files Browse the repository at this point in the history
Set some recommended params for sqlite connection.
  • Loading branch information
vcastellm authored and goran-ethernal committed Dec 18, 2024
1 parent 5ce244b commit b4b73e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (

// NewSQLiteDB creates a new SQLite DB
func NewSQLiteDB(dbPath string) (*sql.DB, error) {
return sql.Open("sqlite3", fmt.Sprintf("file:%s?_txlock=exclusive&_foreign_keys=on", dbPath))
return sql.Open("sqlite3", fmt.Sprintf("file:%s?_txlock=exclusive&_foreign_keys=on&_journal_mode=WAL", dbPath))
}

func ReturnErrNotFound(err error) error {
Expand Down

0 comments on commit b4b73e4

Please sign in to comment.