category search

This commit is contained in:
javi 2015-11-21 09:02:59 +01:00
parent f82283ff54
commit 7c2d0b353a

View File

@ -622,6 +622,18 @@ var Profiler = require('../profiler');
}.bind(this)); }.bind(this));
}, },
categorySearch: function(attr, query, callback) {
var sql = format("select category_value as category, category_count as \"value\" from {table}_{varName}_category_statistics where category_value like '{query}%' limit 100", {
table: this.options.table,
varName: attr,
query: query
})
this.sql(sql, function(data) {
callback(JSON.parse(data.responseText).rows);
});
},
_getHistogramForTiles: function(varName, start, end, bins, tiles, table, own_filter, callback){ _getHistogramForTiles: function(varName, start, end, bins, tiles, table, own_filter, callback){
var sql = [ var sql = [