mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
19 lines
601 B
Go
19 lines
601 B
Go
package db
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana/pkg/services/sqlstore"
|
|
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
|
|
"github.com/grafana/grafana/pkg/services/sqlstore/session"
|
|
)
|
|
|
|
type DB interface {
|
|
WithTransactionalDbSession(ctx context.Context, callback sqlstore.DBTransactionFunc) error
|
|
WithDbSession(ctx context.Context, callback sqlstore.DBTransactionFunc) error
|
|
NewSession(ctx context.Context) *sqlstore.DBSession
|
|
GetDialect() migrator.Dialect
|
|
GetSqlxSession() *session.SessionDB
|
|
InTransaction(ctx context.Context, fn func(ctx context.Context) error) error
|
|
}
|