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.
This commit is contained in:
Elle Mouton 2025-03-02 13:36:57 +02:00
parent b3bc6df4e4
commit a82cda6ab4
No known key found for this signature in database
GPG key ID: D7D916376026F177

View file

@ -67,8 +67,8 @@ type SQLStore struct {
// in order to implement all its CRUD logic.
db BatchedSQLQueries
// DB represents the underlying database connection.
*sql.DB
// BaseDB represents the underlying database connection.
*db.BaseDB
clock clock.Clock
}
@ -83,9 +83,9 @@ func NewSQLStore(sqlDB *db.BaseDB, clock clock.Clock) *SQLStore {
)
return &SQLStore{
db: executor,
DB: sqlDB.DB,
clock: clock,
db: executor,
BaseDB: sqlDB,
clock: clock,
}
}