use metricColumn in query builder

This commit is contained in:
Sven Klemm 2018-03-04 23:32:23 +01:00
parent 6766028d7a
commit 83200c289a

View File

@ -217,6 +217,10 @@ export default class PostgresQuery {
query += selectText; query += selectText;
} }
if (this.target.metricColumn !== 'None') {
query += "," + this.quoteIdentifier(this.target.metricColumn) + " AS metric";
}
query += ' FROM ' + target.schema + '.' + target.table + ' WHERE '; query += ' FROM ' + target.schema + '.' + target.table + ' WHERE ';
var conditions = _.map(target.where, (tag, index) => { var conditions = _.map(target.where, (tag, index) => {
return this.renderTagCondition(tag, index, interpolate); return this.renderTagCondition(tag, index, interpolate);