Include check for surrogate-key header and renamed the test file
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user