From 4578305b25afcebee0d81e6a6ce60bb7bf3f5166 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 2 Jun 2024 19:25:34 +0500 Subject: [PATCH] refactor: redka - allow pragma in OpenDB --- redka.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/redka.go b/redka.go index e767067..95a7d7a 100644 --- a/redka.go +++ b/redka.go @@ -123,8 +123,7 @@ func Open(path string, opts *Options) (*DB, error) { // Does not apply any database settings. func OpenDB(rw *sql.DB, ro *sql.DB, opts *Options) (*DB, error) { opts = applyOptions(defaultOptions, opts) - // Disable pragmas since we are using an already opened database. - sdb, err := sqlx.Open(rw, ro, newTx, nil) + sdb, err := sqlx.Open(rw, ro, newTx, opts.Pragma) if err != nil { return nil, err }