Skip to content

Commit a82cda6

Browse files
committed
accounts: keep the full *db.BaseDB pointer
This will make it possible in SQL unit tests to extract the BaseDB used for accounts and use it to init another Store backed by the same BaseDB.
1 parent b3bc6df commit a82cda6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

accounts/store_sql.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ type SQLStore struct {
6767
// in order to implement all its CRUD logic.
6868
db BatchedSQLQueries
6969

70-
// DB represents the underlying database connection.
71-
*sql.DB
70+
// BaseDB represents the underlying database connection.
71+
*db.BaseDB
7272

7373
clock clock.Clock
7474
}
@@ -83,9 +83,9 @@ func NewSQLStore(sqlDB *db.BaseDB, clock clock.Clock) *SQLStore {
8383
)
8484

8585
return &SQLStore{
86-
db: executor,
87-
DB: sqlDB.DB,
88-
clock: clock,
86+
db: executor,
87+
BaseDB: sqlDB,
88+
clock: clock,
8989
}
9090
}
9191

0 commit comments

Comments
 (0)