Skip to content

Commit

Permalink
refactor: redka - allow pragma in OpenDB
Browse files Browse the repository at this point in the history
  • Loading branch information
nalgeon committed Jun 2, 2024
1 parent 190d4dc commit 4578305
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions redka.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4578305

Please sign in to comment.