Chore: remove xorm from preference (#53803)

* Chore: remove xorm from preference

* separte feature toggle

* fix comments

* fix comments

* remove the dublicated namedexec
This commit is contained in:
ying-jeanne
2022-08-17 22:07:20 -04:00
committed by GitHub
parent 4ac87a3b3b
commit 82b63688d2
10 changed files with 247 additions and 103 deletions
+4
View File
@@ -299,6 +299,10 @@ func (ss *SQLStore) buildConnectionString() (string, error) {
cnnstr += "&sql_mode='ANSI_QUOTES'"
}
if ss.Cfg.IsFeatureToggleEnabled("newDBLibrary") {
cnnstr += "&parseTime=true"
}
cnnstr += ss.buildExtraConnectionString('&')
case migrator.Postgres:
addr, err := util.SplitHostPortDefault(ss.dbCfg.Host, "127.0.0.1", "5432")
+1 -1
View File
@@ -28,7 +28,7 @@ func MySQLTestDB() TestDB {
if port == "" {
port = "3306"
}
conn_str := fmt.Sprintf("grafana:password@tcp(%s:%s)/grafana_tests?collation=utf8mb4_unicode_ci&sql_mode='ANSI_QUOTES'", host, port)
conn_str := fmt.Sprintf("grafana:password@tcp(%s:%s)/grafana_tests?collation=utf8mb4_unicode_ci&sql_mode='ANSI_QUOTES'&parseTime=true", host, port)
return TestDB{
DriverName: "mysql",
ConnStr: conn_str,