mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 20:59:35 +08:00
remove dead code from sql_part
fix where clause query generation
This commit is contained in:
@ -56,6 +56,9 @@ export default class PostgresQuery {
|
||||
this.target.where = _.map(this.whereParts, function(part: any) {
|
||||
return { type: part.def.type, params: part.params };
|
||||
});
|
||||
this.target.groupBy = _.map(this.groupByParts, function(part: any) {
|
||||
return { type: part.def.type, params: part.params };
|
||||
});
|
||||
}
|
||||
|
||||
hasGroupByTime() {
|
||||
@ -197,7 +200,7 @@ export default class PostgresQuery {
|
||||
});
|
||||
|
||||
if (conditions.length > 0) {
|
||||
query += '(' + conditions.join(' ') + ') AND ';
|
||||
query += '(' + conditions.join(' AND ') + ') AND ';
|
||||
}
|
||||
|
||||
query += '$__timeFilter(' + this.quoteIdentifier(target.timeColumn) + ')';
|
||||
|
Reference in New Issue
Block a user