Include check for surrogate-key header and renamed the test file

This commit is contained in:
Mario de Frutos
2017-04-07 15:59:58 +02:00
parent fa6493ae44
commit 9707881bf9
4 changed files with 49 additions and 35 deletions
+1 -1
View File
@@ -392,7 +392,7 @@ LayergroupController.prototype.getAffectedTables = function(user, dbName, layerg
assert.ifError(err);
var queries = [];
mapConfig.getLayers().map(function(layer) {
mapConfig.getLayers().forEach(function(layer) {
queries.push(layer.options.sql);
if (layer.options.affected_tables) {
layer.options.affected_tables.map(function(table) {
+1 -1
View File
@@ -307,7 +307,7 @@ MapController.prototype.afterLayergroupCreate = function(req, res, mapconfig, la
});
var sql = [];
mapconfig.getLayers().map(function(layer) {
mapconfig.getLayers().forEach(function(layer) {
sql.push(layer.options.sql);
if (layer.options.affected_tables) {
layer.options.affected_tables.map(function(table) {
@@ -334,7 +334,9 @@ function AnalysisError(message) {
function getAllAffectedTablesFromSourceNodes(node) {
var affectedTables = node.getAllInputNodes(function (node) {
return node.getType() === 'source';
}).reduce(function(list, node) { return list.concat(node.getAffectedTables()); },[]);
}).reduce(function(list, node) {
return list.concat(node.getAffectedTables());
},[]);
return affectedTables;
}