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:
@@ -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