fixed sql generation where threre is not filter

This commit is contained in:
javi 2015-11-17 11:12:28 +01:00
parent 21e28bf66b
commit 5299314fb4

View File

@ -424,8 +424,11 @@ var Profiler = require('../profiler');
"and (((quadkey_y & (255 << {shift})) >> {shift}) - {torque_tile_y}) between -{tolerance} and {tolerance} "
]
if(applyFilters) {
sql.push("and (" + this._generateFiltersSQL(false) + ")");
if (applyFilters) {
var f = this._generateFiltersSQL(false);
if (f.length) {
sql.push("and (" + f + ")");
}
}
sql.push("limit {maxNo}");