Skip to content

Commit 07e2e41

Browse files
session: update SQLstore to expose db.BaseDB
In preparation for migrating sessions to the new SQLstore, we need to expose db.BaseDB in the SQLstore. Therefore we change the SQLstore to embed the BaseDB interface, rather than the concrete *sql.DB type.
1 parent 4b162f5 commit 07e2e41

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

session/sql_store.go

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

68-
// DB represents the underlying database connection.
69-
*sql.DB
68+
// BaseDB represents the underlying database connection.
69+
*db.BaseDB
7070

7171
clock clock.Clock
7272
}
@@ -81,9 +81,9 @@ func NewSQLStore(sqlDB *db.BaseDB, clock clock.Clock) *SQLStore {
8181
)
8282

8383
return &SQLStore{
84-
db: executor,
85-
DB: sqlDB.DB,
86-
clock: clock,
84+
db: executor,
85+
BaseDB: sqlDB,
86+
clock: clock,
8787
}
8888
}
8989

0 commit comments

Comments
 (0)