optimalized NPM plugins

This commit is contained in:
SPRINX0\prochazka
2024-11-14 12:27:17 +01:00
parent 632870d448
commit cd06f13fcb
14 changed files with 15 additions and 11 deletions

View File

@@ -1,4 +1,3 @@
const fp = require('lodash/fp');
const _ = require('lodash');
const sql = require('./sql');
@@ -172,7 +171,7 @@ class Analyser extends DatabaseAnalyser {
})),
procedures: programmables.rows
.filter(x => x.objectType == 'PROCEDURE')
.map(fp.omit(['objectType']))
.map(x => _.omit(x, ['objectType']))
.map(x => ({
...x,
createSql: `DELIMITER //\n\nCREATE PROCEDURE \`${x.pureName}\`()\n${x.routineDefinition}\n\nDELIMITER ;\n`,
@@ -181,7 +180,7 @@ class Analyser extends DatabaseAnalyser {
})),
functions: programmables.rows
.filter(x => x.objectType == 'FUNCTION')
.map(fp.omit(['objectType']))
.map(x => _.omit(x, ['objectType']))
.map(x => ({
...x,
createSql: `CREATE FUNCTION \`${x.pureName}\`()\nRETURNS ${x.returnDataType} ${