Use new _Updated_At function and new names
This commit is contained in:
parent
95ab99be4d
commit
b7ff554209
@ -30,7 +30,7 @@ QueryTablesApi.prototype.getAffectedTablesInQuery = function (username, sql, cal
|
||||
|
||||
QueryTablesApi.prototype.getAffectedTablesAndLastUpdatedTime = function (username, sql, callback) {
|
||||
var query =
|
||||
'SELECT * FROM CDB_QueryTablesUpdatedAt($windshaft$' + prepareSql(sql) + '$windshaft$)';
|
||||
'SELECT * FROM CDB_QueryTables_Updated_At($windshaft$' + prepareSql(sql) + '$windshaft$)';
|
||||
|
||||
this.pgQueryRunner.run(username, query, function handleAffectedTablesAndLastUpdatedTimeRows (err, rows) {
|
||||
if (err) {
|
||||
|
@ -10,13 +10,13 @@ module.exports = DatabaseTables;
|
||||
|
||||
DatabaseTables.prototype.key = function() {
|
||||
return this.tables.map(function(table) {
|
||||
return this.namespace + ':' + shortHashKey(table.db_name + ':' + table.table_name + '.' + table.schema_name);
|
||||
return this.namespace + ':' + shortHashKey(table.dbname + ':' + table.table_name + '.' + table.schema_name);
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
DatabaseTables.prototype.getCacheChannel = function() {
|
||||
var key = this.tables.map(function(table) {
|
||||
return table.db_name + ':' + table.schema_name + "." + table.table_name;
|
||||
return table.dbname + ':' + table.schema_name + "." + table.table_name;
|
||||
}).join(";;");
|
||||
return key;
|
||||
};
|
||||
|
@ -263,8 +263,8 @@ describe(suiteName, function() {
|
||||
expected_token = parsedBody.layergroupid.split(':')[0];
|
||||
helper.checkCache(res);
|
||||
helper.checkSurrogateKey(res, new TablesCacheEntry([
|
||||
{db_name: "test_windshaft_cartodb_user_1_db", table_name: "test_table", schema_name: "public"},
|
||||
{db_name: "test_windshaft_cartodb_user_1_db", table_name: "test_table_2", schema_name: "public"},
|
||||
{dbname: "test_windshaft_cartodb_user_1_db", table_name: "test_table", schema_name: "public"},
|
||||
{dbname: "test_windshaft_cartodb_user_1_db", table_name: "test_table_2", schema_name: "public"},
|
||||
]).key().join(' '));
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user