From e43feb7bfa0551125f82dbcf6503564227f091a1 Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Fri, 27 Jul 2018 13:21:40 +0200 Subject: [PATCH] use const for rowlimit in sql engine --- pkg/tsdb/sql_engine.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/tsdb/sql_engine.go b/pkg/tsdb/sql_engine.go index 9321e8912dc..27ed37923a3 100644 --- a/pkg/tsdb/sql_engine.go +++ b/pkg/tsdb/sql_engine.go @@ -100,6 +100,8 @@ var NewSqlQueryEndpoint = func(config *SqlQueryEndpointConfiguration, rowTransfo return &queryEndpoint, nil } +const rowLimit = 1000000 + // Query is the main function for the SqlQueryEndpoint func (e *sqlQueryEndpoint) Query(ctx context.Context, dsInfo *models.DataSource, tsdbQuery *TsdbQuery) (*Response, error) { result := &Response{ @@ -164,7 +166,6 @@ func (e *sqlQueryEndpoint) transformToTable(query *Query, rows *core.Rows, resul return err } - rowLimit := 1000000 rowCount := 0 timeIndex := -1 @@ -225,7 +226,6 @@ func (e *sqlQueryEndpoint) transformToTimeSeries(query *Query, rows *core.Rows, return err } - rowLimit := 1000000 rowCount := 0 timeIndex := -1 metricIndex := -1