diff --git a/backend/query_builder.go b/backend/query_builder.go index 03d7e0f..76c09f0 100644 --- a/backend/query_builder.go +++ b/backend/query_builder.go @@ -12,11 +12,11 @@ type QueryBuilder struct{} func (qb *QueryBuilder) MetricQuery(queryData *simplejson.Json, timeRangeFrom string, timeRangeTo string) string { allowFiltering := "" if queryData.Get("filtering").MustBool() { - allowFiltering = "ALLOW FILTERING" + allowFiltering = " ALLOW FILTERING" } preparedQuery := fmt.Sprintf( - "SELECT %s, CAST(%s as double) FROM %s.%s WHERE %s = %s AND %s >= '%s' AND %s <= '%s' %s", + "SELECT %s, CAST(%s as double) FROM %s.%s WHERE %s = %s AND %s >= '%s' AND %s <= '%s'%s", queryData.Get("columnTime").MustString(), queryData.Get("columnValue").MustString(), queryData.Get("keyspace").MustString(),