SQL Expressions: Query Service Support (#101955)
--------- Co-authored-by: Adam Simpson <adam@adamsimpson.net> Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
This commit is contained in:
co-authored by
Adam Simpson
Sarah Zinger
parent
370f4c2bcd
commit
4a0ec27e5d
+2
-11
@@ -126,9 +126,8 @@ func (h *ExpressionQueryReader) ReadQuery(
|
||||
}
|
||||
|
||||
case QueryTypeSQL:
|
||||
enabled := enableSqlExpressions(h)
|
||||
if !enabled {
|
||||
return eq, fmt.Errorf("sqlExpressions is not implemented")
|
||||
if !h.features.IsEnabledGlobally(featuremgmt.FlagSqlExpressions) {
|
||||
return eq, fmt.Errorf("sql expressions are disabled")
|
||||
}
|
||||
q := &SQLExpression{}
|
||||
err = iter.ReadVal(q)
|
||||
@@ -192,11 +191,3 @@ func getReferenceVar(exp string, refId string) (string, error) {
|
||||
}
|
||||
return exp, nil
|
||||
}
|
||||
|
||||
func enableSqlExpressions(h *ExpressionQueryReader) bool {
|
||||
enabled := !h.features.IsEnabledGlobally(featuremgmt.FlagSqlExpressions)
|
||||
if enabled {
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user