mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 03:12:13 +08:00
SQL Expressions: Allow substring_index func (#103021)
This commit is contained in:
@ -62,6 +62,11 @@ func TestAllowQuery(t *testing.T) {
|
||||
q: `SELECT 'some text' COLLATE utf8mb4_bin`,
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "allow substring_index",
|
||||
q: `SELECT __value__, SUBSTRING_INDEX(name, '.', -1) AS code FROM A`,
|
||||
err: nil,
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user