chore: sqlstore cleanup (#60415)
* chore: remove unused test helper from sqlstore TimeNow() is no longer used in any tests in this package. * chore: move sqlstore.SQLBuilder to the infra/db package This required some minor refactoring; we need to be a little more explicit about passing around the dialect and engine. On the other hand, that's a few fewer uses of the `dialect` global constant! * chore: move UserDeletions into the only package using it * cleanup around moving sqlbuilder * remove dialect and sqlog global vars * rename userDeletions to serviceAccountDeletions
This commit is contained in:
@@ -105,7 +105,7 @@ func deleteAlertByIdInternal(alertId int64, reason string, sess *db.Session, log
|
||||
|
||||
func (ss *sqlStore) HandleAlertsQuery(ctx context.Context, query *models.GetAlertsQuery) error {
|
||||
return ss.db.WithDbSession(ctx, func(sess *db.Session) error {
|
||||
builder := db.NewSqlBuilder(ss.cfg)
|
||||
builder := db.NewSqlBuilder(ss.cfg, ss.db.GetDialect())
|
||||
|
||||
builder.Write(`SELECT
|
||||
alert.id,
|
||||
|
||||
Reference in New Issue
Block a user