Sql Expressions: (Chore) Dedicated logger for expr.sql, and pass context (#109549)
This commit is contained in:
+3
-1
@@ -1,6 +1,7 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
@@ -44,6 +45,7 @@ func NewExpressionQueryReader(features featuremgmt.FeatureToggles) *ExpressionQu
|
||||
|
||||
// nolint:gocyclo
|
||||
func (h *ExpressionQueryReader) ReadQuery(
|
||||
ctx context.Context,
|
||||
// Properties that have been parsed off the same node
|
||||
common data.DataQuery,
|
||||
// An iterator with context for the full node (include common values)
|
||||
@@ -135,7 +137,7 @@ func (h *ExpressionQueryReader) ReadQuery(
|
||||
eq.Properties = q
|
||||
// TODO: Cascade limit from Grafana config in this (new Expression Parser) branch of the code
|
||||
cellLimit := 0 // zero means no limit
|
||||
eq.Command, err = NewSQLCommand(common.RefID, q.Format, q.Expression, int64(cellLimit), 0, 0)
|
||||
eq.Command, err = NewSQLCommand(ctx, common.RefID, q.Format, q.Expression, int64(cellLimit), 0, 0)
|
||||
}
|
||||
|
||||
case QueryTypeThreshold:
|
||||
|
||||
Reference in New Issue
Block a user