leo-connector-common
Advanced tools
Comparing version 1.5.7 to 1.6.0
@@ -142,9 +142,20 @@ "use strict"; | ||
let nks = tableNks[field.dimension]; | ||
if (nks && nks.length == 1) { | ||
link.on = nks[0]; | ||
} | ||
if (field.on && typeof field.on == 'object' && !Array.isArray(field.on)) { | ||
link.on = []; | ||
link.source = []; | ||
Object.entries(field.on).map(([key, val]) => { | ||
link.on.push(val); | ||
link.source.push(key); | ||
}) | ||
} else if (nks && nks.length == 1) { | ||
link.on = nks[0]; | ||
} else if (nks && nks.length > 1) { | ||
link.on = nks; | ||
link.source = field.on; | ||
} | ||
} | ||
links.push(Object.assign({ | ||
table: null, | ||
on: f, | ||
join_id: f, | ||
on: f, | ||
destination: client.getDimensionColumn(f, field), | ||
@@ -151,0 +162,0 @@ link_date: "_auditdate", |
13
dol.js
@@ -408,3 +408,3 @@ const leo = require("leo-sdk"); | ||
let sqlClient = client; | ||
let joinsCount = Object.keys(domainObject.joins).length; | ||
async.eachLimit(Object.entries(ids), 5, ([schema, ids], callback) => { | ||
@@ -579,5 +579,14 @@ let tasks = []; | ||
// skip the domain if there is no data with it | ||
if (Object.keys(domains[id]).length === 0) { | ||
let keyCount = Object.keys(domains[id]).length; | ||
if (keyCount === 0) { | ||
console.log('[INFO] Skipping domain id due to empty object. #: ' + id); | ||
return; | ||
} else if (keyCount <= joinsCount) { | ||
let valid = Object.keys(domainObject.joins).some(k => { | ||
return Object.keys(domains[id][k] || []).length > 0; | ||
}); | ||
if (!valid) { | ||
console.log('[INFO] Skipping domain id due to empty object. #: ' + id); | ||
return; | ||
} | ||
} | ||
@@ -584,0 +593,0 @@ // let eids = {}; // TODO: get event info |
{ | ||
"name": "leo-connector-common", | ||
"version": "1.5.7", | ||
"version": "1.6.0", | ||
"description": "Common package for all Leo Platform database connectors", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112024
4091