AlertingNG: Save alert instances (#30223)

* AlertingNG: Save alert instances

Co-authored-by: Kyle Brandt <kyle@grafana.com>

* Rename alert instance fields/columns

* Include definition title in listing alert instances

* Delete instances when deleting defintion

Co-authored-by: Kyle Brandt <kyle@grafana.com>
This commit is contained in:
Sofia Papagiannaki
2021-01-18 20:57:17 +02:00
committed by GitHub
co-authored by Kyle Brandt
parent 93a59561ba
commit 8c31e25926
16 changed files with 675 additions and 12 deletions
@@ -34,6 +34,8 @@ type Dialect interface {
IndexCheckSQL(tableName, indexName string) (string, []interface{})
ColumnCheckSQL(tableName, columnName string) (string, []interface{})
// UpsertSQL returns the upsert sql statement for a dialect
UpsertSQL(tableName string, keyCols, updateCols []string) string
ColString(*Column) string
ColStringNoPk(*Column) string
@@ -281,3 +283,8 @@ func (b *BaseDialect) NoOpSQL() string {
func (b *BaseDialect) TruncateDBTables() error {
return nil
}
//UpsertSQL returns empty string
func (b *BaseDialect) UpsertSQL(tableName string, keyCols, updateCols []string) string {
return ""
}