mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 06:02:49 +08:00
Alerting: fix ngalert alertmanager SQL Syntax Errors (#40827)
* test kvstore in intregration tests with different databases * escape 'key' in delete query * export quote and use it in kvstore
This commit is contained in:

committed by
GitHub

parent
889d4683a1
commit
d1aefa1792
@ -161,6 +161,11 @@ func (ss *SQLStore) Reset() error {
|
||||
return ss.ensureMainOrgAndAdminUser()
|
||||
}
|
||||
|
||||
// Quote quotes the value in the used SQL dialect
|
||||
func (ss *SQLStore) Quote(value string) string {
|
||||
return ss.engine.Quote(value)
|
||||
}
|
||||
|
||||
func (ss *SQLStore) ensureMainOrgAndAdminUser() error {
|
||||
ctx := context.Background()
|
||||
err := ss.WithTransactionalDbSession(ctx, func(sess *DBSession) error {
|
||||
|
Reference in New Issue
Block a user