Fix: add mapping for the new mysqlRepl driver (#89551)

This commit is contained in:
Kristin Laemmert 2024-06-21 08:35:46 -04:00 committed by GitHub
parent 4be92ed111
commit ab5a079bcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,9 +6,10 @@ import (
"strconv"
"strings"
"github.com/grafana/grafana/pkg/services/sqlstore/session"
"golang.org/x/exp/slices"
"xorm.io/xorm"
"github.com/grafana/grafana/pkg/services/sqlstore/session"
)
var (
@ -106,12 +107,13 @@ type LockCfg struct {
type dialectFunc func() Dialect
var supportedDialects = map[string]dialectFunc{
MySQL: NewMysqlDialect,
SQLite: NewSQLite3Dialect,
Postgres: NewPostgresDialect,
MySQL + "WithHooks": NewMysqlDialect,
SQLite + "WithHooks": NewSQLite3Dialect,
Postgres + "WithHooks": NewPostgresDialect,
MySQL: NewMysqlDialect,
SQLite: NewSQLite3Dialect,
Postgres: NewPostgresDialect,
MySQL + "WithHooks": NewMysqlDialect,
MySQL + "ReplicaWithHooks": NewMysqlDialect,
SQLite + "WithHooks": NewSQLite3Dialect,
Postgres + "WithHooks": NewPostgresDialect,
}
func NewDialect(driverName string) Dialect {