chore: replace sqlstore.Store with db.DB (#57010)

* chore: replace sqlstore.SQLStore with db.DB

* more post-sqlstore.SQLStore cleanup
This commit is contained in:
Kristin Laemmert
2022-10-14 15:33:06 -04:00
committed by GitHub
parent 2b4d57fe60
commit c61b5e85b4
59 changed files with 275 additions and 244 deletions
@@ -11,16 +11,15 @@ import (
"github.com/grafana/grafana/pkg/services/publicdashboards/internal/tokens"
. "github.com/grafana/grafana/pkg/services/publicdashboards/models"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/services/sqlstore/db"
"github.com/grafana/grafana/pkg/util"
)
// Define the storage implementation. We're generating the mock implementation
// automatically
type PublicDashboardStoreImpl struct {
sqlStore *sqlstore.SQLStore
sqlStore db.DB
log log.Logger
dialect migrator.Dialect
}
var LogPrefix = "publicdashboards.store"
@@ -30,11 +29,10 @@ var LogPrefix = "publicdashboards.store"
var _ publicdashboards.Store = (*PublicDashboardStoreImpl)(nil)
// Factory used by wire to dependency injection
func ProvideStore(sqlStore *sqlstore.SQLStore) *PublicDashboardStoreImpl {
func ProvideStore(sqlStore db.DB) *PublicDashboardStoreImpl {
return &PublicDashboardStoreImpl{
sqlStore: sqlStore,
log: log.New(LogPrefix),
dialect: sqlStore.Dialect,
}
}