return conn.Exec error

This commit is contained in:
Gani Georgiev 2023-05-27 09:07:38 +03:00
parent f6a616b7e8
commit dcdf43f0fc
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ func init() {
sql.Register("sqlite3_with_connect_hook", sql.Register("sqlite3_with_connect_hook",
&sqlite3.SQLiteDriver{ &sqlite3.SQLiteDriver{
ConnectHook: func(conn *sqlite3.SQLiteConn) error { ConnectHook: func(conn *sqlite3.SQLiteConn) error {
conn.Exec(` _, err := conn.Exec(`
PRAGMA busy_timeout = 10000; PRAGMA busy_timeout = 10000;
PRAGMA journal_mode = WAL; PRAGMA journal_mode = WAL;
PRAGMA journal_size_limit = 200000000; PRAGMA journal_size_limit = 200000000;
@ -30,7 +30,7 @@ func init() {
PRAGMA foreign_keys = ON; PRAGMA foreign_keys = ON;
`, nil) `, nil)
return nil return err
}, },
}, },
) )