SQLStore: Support Upserting multiple rows. (#52228)

This will be used to reduce write load when the alerting system writes a
large number of events.
This commit is contained in:
Joe Blubaugh
2022-07-19 16:42:48 +08:00
committed by GitHub
parent e74c2390de
commit a0f96ed4e1
5 changed files with 141 additions and 10 deletions
@@ -49,6 +49,7 @@ type Dialect interface {
ColumnCheckSQL(tableName, columnName string) (string, []interface{})
// UpsertSQL returns the upsert sql statement for a dialect
UpsertSQL(tableName string, keyCols, updateCols []string) string
UpsertMultipleSQL(tableName string, keyCols, updateCols []string, count int) (string, error)
ColString(*Column) string
ColStringNoPk(*Column) string