We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 245f6df commit 422e694Copy full SHA for 422e694
coderd/database/db.go
@@ -57,12 +57,17 @@ func WithSerialRetryCount(count int) func(*sqlQuerier) {
57
// New creates a new database store using a SQL database connection.
58
func New(sdb *sql.DB, opts ...func(*sqlQuerier)) Store {
59
dbx := sqlx.NewDb(sdb, "postgres")
60
- return &sqlQuerier{
+ q := &sqlQuerier{
61
db: dbx,
62
sdb: dbx,
63
// This is an arbitrary number.
64
serialRetryCount: 3,
65
}
66
+
67
+ for _, opt := range opts {
68
+ opt(q)
69
+ }
70
+ return q
71
72
73
// TxOptions is used to pass some execution metadata to the callers.
0 commit comments