mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
update the feature toggle usage in backend (#56787)
This commit is contained in:
parent
10c080dad1
commit
80ede174dd
@ -74,4 +74,5 @@ export interface FeatureToggles {
|
|||||||
increaseInMemDatabaseQueryCache?: boolean;
|
increaseInMemDatabaseQueryCache?: boolean;
|
||||||
newPanelChromeUI?: boolean;
|
newPanelChromeUI?: boolean;
|
||||||
queryLibrary?: boolean;
|
queryLibrary?: boolean;
|
||||||
|
mysqlAnsiQuotes?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -322,5 +322,10 @@ var (
|
|||||||
State: FeatureStateAlpha,
|
State: FeatureStateAlpha,
|
||||||
RequiresDevMode: true,
|
RequiresDevMode: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "mysqlAnsiQuotes",
|
||||||
|
Description: "Use double quote to escape keyword in Mysql query",
|
||||||
|
State: FeatureStateAlpha,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -238,4 +238,8 @@ const (
|
|||||||
// FlagQueryLibrary
|
// FlagQueryLibrary
|
||||||
// Reusable query library
|
// Reusable query library
|
||||||
FlagQueryLibrary = "queryLibrary"
|
FlagQueryLibrary = "queryLibrary"
|
||||||
|
|
||||||
|
// FlagMysqlAnsiQuotes
|
||||||
|
// Use double quote to escape keyword in Mysql query
|
||||||
|
FlagMysqlAnsiQuotes = "mysqlAnsiQuotes"
|
||||||
)
|
)
|
||||||
|
@ -289,7 +289,7 @@ func (ss *SQLStore) buildConnectionString() (string, error) {
|
|||||||
cnnstr += fmt.Sprintf("&tx_isolation=%s", val)
|
cnnstr += fmt.Sprintf("&tx_isolation=%s", val)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ss.Cfg.IsFeatureToggleEnabled("mysqlAnsiQuotes") || ss.Cfg.IsFeatureToggleEnabled("newDBLibrary") {
|
if ss.Cfg.IsFeatureToggleEnabled(featuremgmt.FlagMysqlAnsiQuotes) || ss.Cfg.IsFeatureToggleEnabled("newDBLibrary") {
|
||||||
cnnstr += "&sql_mode='ANSI_QUOTES'"
|
cnnstr += "&sql_mode='ANSI_QUOTES'"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user