Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 58288de

Browse files
committed
fixes
1 parent d3bbe9b commit 58288de

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

coderd/cryptokeys/rotate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func (k *rotator) rotateKeys(ctx context.Context) error {
161161
}
162162
}
163163
return nil
164-
}, &sql.TxOptions{
164+
}, &database.TxOptions{
165165
Isolation: sql.LevelRepeatableRead,
166166
})
167167
}

coderd/database/dbrollup/dbrollup_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type wrapUpsertDB struct {
3838
resume <-chan struct{}
3939
}
4040

41-
func (w *wrapUpsertDB) InTx(fn func(database.Store) error, opts *sql.TxOptions) error {
41+
func (w *wrapUpsertDB) InTx(fn func(database.Store) error, opts *database.TxOptions) error {
4242
return w.Store.InTx(func(tx database.Store) error {
4343
return fn(&wrapUpsertDB{Store: tx, resume: w.resume})
4444
}, opts)

coderd/wsbuilder/wsbuilder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ func expectDB(t *testing.T, opts ...txExpect) *dbmock.MockStore {
735735
// we expect to be run in a transaction; we use mTx to record the
736736
// "in transaction" calls.
737737
mDB.EXPECT().InTx(
738-
gomock.Any(), gomock.Eq(&sql.TxOptions{Isolation: sql.LevelRepeatableRead}),
738+
gomock.Any(), gomock.Eq(&database.TxOptions{Isolation: sql.LevelRepeatableRead}),
739739
).
740740
DoAndReturn(func(f func(database.Store) error, _ *sql.TxOptions) error {
741741
err := f(mTx)

enterprise/dbcrypt/dbcrypt.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ type dbCrypt struct {
6060
database.Store
6161
}
6262

63-
func (db *dbCrypt) InTx(function func(database.Store) error, txOpts *sql.TxOptions) error {
63+
func (db *dbCrypt) InTx(function func(database.Store) error, txOpts *database.TxOptions) error {
6464
return db.Store.InTx(func(s database.Store) error {
6565
return function(&dbCrypt{
6666
primaryCipherDigest: db.primaryCipherDigest,
@@ -445,5 +445,5 @@ func (db *dbCrypt) ensureEncrypted(ctx context.Context) error {
445445
ActiveKeyDigest: db.primaryCipherDigest,
446446
Test: testValue,
447447
})
448-
}, &sql.TxOptions{Isolation: sql.LevelRepeatableRead})
448+
}, &database.TxOptions{Isolation: sql.LevelRepeatableRead})
449449
}

0 commit comments

Comments
 (0)