@oasisdex/spock-etl
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -106,14 +106,17 @@ "use strict"; | ||
} | ||
const dependencies = getAllDependencies(processor); | ||
const query = dependencies.length === 0 | ||
? ` | ||
SELECT b.* FROM vulcan2x.block b | ||
WHERE b.id > ${job.last_block_id} ORDER BY id | ||
LIMIT ${batchSize};` | ||
: ` | ||
SELECT b.* FROM vulcan2x.block b | ||
WHERE id<= (SELECT MIN(last_block_id) FROM vulcan2x.job WHERE name in( | ||
${dependencies.map((dependency) => `'${dependency}'`).join(',')} | ||
)) AND b.id > ${job.last_block_id} ORDER BY id | ||
LIMIT ${batchSize};`; | ||
const nextBlocks = (await c.manyOrNone( | ||
// prettier-ignore | ||
` | ||
SELECT b.* | ||
FROM vulcan2x.block b | ||
${getAllDependencies(processor) | ||
.map((d, i) => `JOIN vulcan2x.job j${i} ON j${i}.name='${d}' AND b.id <= j${i}.last_block_id`) | ||
.join('\n')} | ||
WHERE b.id > ${job.last_block_id} | ||
ORDER BY id | ||
LIMIT ${batchSize}; | ||
`)) || []; | ||
query)) || []; | ||
return lodash_1.sortBy(nextBlocks, 'id'); | ||
@@ -120,0 +123,0 @@ }); |
{ | ||
"name": "@oasisdex/spock-etl", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"license": "AGPL-3.0-or-later", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
153017
1847
0