Chore: Remove Store interface and use db.DB instead (#60160)

* Chore: Remove Store interface and use db.DB instead

* use old-style session exec
This commit is contained in:
Serge Zaitsev
2022-12-13 11:03:36 +01:00
committed by GitHub
parent 4c4bc3bd32
commit af7d293eaf
13 changed files with 27 additions and 53 deletions
-26
View File
@@ -1,26 +0,0 @@
package sqlstore
import (
"context"
"xorm.io/core"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/services/sqlstore/session"
)
type Store interface {
GetDialect() migrator.Dialect
GetDBType() core.DbType
WithDbSession(ctx context.Context, callback DBTransactionFunc) error
WithNewDbSession(ctx context.Context, callback DBTransactionFunc) error
WithTransactionalDbSession(ctx context.Context, callback DBTransactionFunc) error
InTransaction(ctx context.Context, fn func(ctx context.Context) error) error
Migrate(bool) error
Sync() error
Reset() error
Quote(value string) string
GetDBHealthQuery(ctx context.Context, query *models.GetDBHealthQuery) error
GetSqlxSession() *session.SessionDB
}