fixed analyse of mysql procedures/functions

This commit is contained in:
Jan Prochazka
2022-02-10 18:50:08 +01:00
parent 2ec962e2f1
commit 966307fd3c
3 changed files with 10 additions and 2 deletions

View File

@@ -132,6 +132,7 @@ class Analyser extends DatabaseAnalyser {
.map(fp.omit(['objectType']))
.map(x => ({
...x,
createSql: `DELIMITER //\n\nCREATE PROCEDURE \`${x.pureName}\`()\n${x.routineDefinition}\n\nDELIMITER ;\n`,
objectId: x.pureName,
contentHash: _.isDate(x.modifyDate) ? x.modifyDate.toISOString() : x.modifyDate,
})),
@@ -140,6 +141,9 @@ class Analyser extends DatabaseAnalyser {
.map(fp.omit(['objectType']))
.map(x => ({
...x,
createSql: `CREATE FUNCTION \`${x.pureName}\`()\nRETURNS ${x.returnDataType} ${
x.isDeterministic == 'YES' ? 'DETERMINISTIC' : 'NOT DETERMINISTIC'
}\n${x.routineDefinition}`,
objectId: x.pureName,
contentHash: _.isDate(x.modifyDate) ? x.modifyDate.toISOString() : x.modifyDate,
})),