Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes
  • Loading branch information
Emyrk committed Oct 24, 2024
commit 58288de464e7d6792a41c81c14bf6370f075af0b
2 changes: 1 addition & 1 deletion coderd/cryptokeys/rotate.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (k *rotator) rotateKeys(ctx context.Context) error {
}
}
return nil
}, &sql.TxOptions{
}, &database.TxOptions{
Isolation: sql.LevelRepeatableRead,
})
}
Expand Down
2 changes: 1 addition & 1 deletion coderd/database/dbrollup/dbrollup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type wrapUpsertDB struct {
resume <-chan struct{}
}

func (w *wrapUpsertDB) InTx(fn func(database.Store) error, opts *sql.TxOptions) error {
func (w *wrapUpsertDB) InTx(fn func(database.Store) error, opts *database.TxOptions) error {
return w.Store.InTx(func(tx database.Store) error {
return fn(&wrapUpsertDB{Store: tx, resume: w.resume})
}, opts)
Expand Down
2 changes: 1 addition & 1 deletion coderd/wsbuilder/wsbuilder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ func expectDB(t *testing.T, opts ...txExpect) *dbmock.MockStore {
// we expect to be run in a transaction; we use mTx to record the
// "in transaction" calls.
mDB.EXPECT().InTx(
gomock.Any(), gomock.Eq(&sql.TxOptions{Isolation: sql.LevelRepeatableRead}),
gomock.Any(), gomock.Eq(&database.TxOptions{Isolation: sql.LevelRepeatableRead}),
).
DoAndReturn(func(f func(database.Store) error, _ *sql.TxOptions) error {
err := f(mTx)
Expand Down
4 changes: 2 additions & 2 deletions enterprise/dbcrypt/dbcrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type dbCrypt struct {
database.Store
}

func (db *dbCrypt) InTx(function func(database.Store) error, txOpts *sql.TxOptions) error {
func (db *dbCrypt) InTx(function func(database.Store) error, txOpts *database.TxOptions) error {
return db.Store.InTx(func(s database.Store) error {
return function(&dbCrypt{
primaryCipherDigest: db.primaryCipherDigest,
Expand Down Expand Up @@ -445,5 +445,5 @@ func (db *dbCrypt) ensureEncrypted(ctx context.Context) error {
ActiveKeyDigest: db.primaryCipherDigest,
Test: testValue,
})
}, &sql.TxOptions{Isolation: sql.LevelRepeatableRead})
}, &database.TxOptions{Isolation: sql.LevelRepeatableRead})
}
Loading