Parse multi-stmts with doble quoted strings, ExporterEngine: shaSum fixes
This commit is contained in:
parent
eba585acf4
commit
2274f77063
6
lib.js
6
lib.js
|
@ -144,12 +144,18 @@ class ExporterEngine {
|
||||||
}
|
}
|
||||||
|
|
||||||
shaSum(sql) {
|
shaSum(sql) {
|
||||||
|
if (!sql) return null;
|
||||||
return shajs('sha256')
|
return shajs('sha256')
|
||||||
.update(JSON.stringify(sql))
|
.update(JSON.stringify(sql))
|
||||||
.digest('hex');
|
.digest('hex');
|
||||||
}
|
}
|
||||||
|
|
||||||
setShaSum(type, schema, name, shaSum) {
|
setShaSum(type, schema, name, shaSum) {
|
||||||
|
if (!shaSum) {
|
||||||
|
this.deleteShaSum(type, schema, name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const shaSums = this.shaSums;
|
const shaSums = this.shaSums;
|
||||||
if (!shaSums[schema])
|
if (!shaSums[schema])
|
||||||
shaSums[schema] = {};
|
shaSums[schema] = {};
|
||||||
|
|
|
@ -561,6 +561,11 @@ const tokens = {
|
||||||
end: '\'',
|
end: '\'',
|
||||||
escape: char => char == '\'' || char == '\\'
|
escape: char => char == '\'' || char == '\\'
|
||||||
},
|
},
|
||||||
|
quotedString: {
|
||||||
|
start: '"',
|
||||||
|
end: '"',
|
||||||
|
escape: char => char == '"' || char == '\\'
|
||||||
|
},
|
||||||
id: {
|
id: {
|
||||||
start: '`',
|
start: '`',
|
||||||
end: '`',
|
end: '`',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "myvc",
|
"name": "myvc",
|
||||||
"version": "1.3.6",
|
"version": "1.3.7",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "MySQL Version Control",
|
"description": "MySQL Version Control",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue