grafana/pkg/services/sqlstore/health.go
Kat Yang d3ae8939af
Chore: Remove x from health, alert notification, dashboard, stats, user (#45265)
* Chore: Remove x from health

* Chore: Remove x from dashboard and user

* Chore: Remove x from alert notification

* Chore: Remove x from stats

* Fix: Update func signature in stats test

* Refactor: Remove x from GetDashboardTags

* Chore: Remove x from dashboard

* Chore: Remove x from Stats

* Fix: Update refs of HasAdminPermissionInFolders

* Fix: Adjust funcs in tests to be sqlStore methods

* Fix: Fix database folder test sqlstore methods
2022-02-17 16:59:09 +01:00

17 lines
383 B
Go

package sqlstore
import (
"context"
"github.com/grafana/grafana/pkg/models"
)
// GetDBHealthQuery executes a query to check
// the availability of the database.
func (ss *SQLStore) GetDBHealthQuery(ctx context.Context, query *models.GetDBHealthQuery) error {
return ss.WithDbSession(ctx, func(session *DBSession) error {
_, err := session.Exec("SELECT 1")
return err
})
}