diff --git a/lib/cartodb/api/query_tables_api.js b/lib/cartodb/api/query_tables_api.js index c6eb2e48..bdcf488e 100644 --- a/lib/cartodb/api/query_tables_api.js +++ b/lib/cartodb/api/query_tables_api.js @@ -13,27 +13,6 @@ var affectedTableRegexCache = { module.exports = QueryTablesApi; -QueryTablesApi.prototype.getLastUpdatedTime = function (username, api_key, tableNames, callback) { - var sql = 'SELECT EXTRACT(EPOCH FROM max(updated_at)) as max FROM CDB_TableMetadata m WHERE m.tabname = any (ARRAY['+ - tableNames.map(function(t) { return "'" + t + "'::regclass"; }).join(',') + - '])'; - - // call sql api - sqlApi.query(username, api_key, sql, function(err, rows){ - if (err){ - var msg = err.message ? err.message : err; - callback(new Error('could not find last updated timestamp: ' + msg)); - return; - } - // when the table has not updated_at means it hasn't been changed so a default last_updated is set - var last_updated = 0; - if(rows.length !== 0) { - last_updated = rows[0].max || 0; - } - - callback(null, last_updated*1000); - }); -}; QueryTablesApi.prototype.getAffectedTablesInQuery = function (username, options, sql, callback) {