diff --git a/lib/torque/provider/filterableJson.js b/lib/torque/provider/filterableJson.js index 5398cfc..374a9f6 100644 --- a/lib/torque/provider/filterableJson.js +++ b/lib/torque/provider/filterableJson.js @@ -622,6 +622,18 @@ var Profiler = require('../profiler'); }.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){ var sql = [