Skip to content

Commit 422e694

Browse files
committed
fix opts
1 parent 245f6df commit 422e694

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

coderd/database/db.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,17 @@ func WithSerialRetryCount(count int) func(*sqlQuerier) {
5757
// New creates a new database store using a SQL database connection.
5858
func New(sdb *sql.DB, opts ...func(*sqlQuerier)) Store {
5959
dbx := sqlx.NewDb(sdb, "postgres")
60-
return &sqlQuerier{
60+
q := &sqlQuerier{
6161
db: dbx,
6262
sdb: dbx,
6363
// This is an arbitrary number.
6464
serialRetryCount: 3,
6565
}
66+
67+
for _, opt := range opts {
68+
opt(q)
69+
}
70+
return q
6671
}
6772

6873
// TxOptions is used to pass some execution metadata to the callers.

0 commit comments

Comments
 (0)