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) {
|
||||
if (!sql) return null;
|
||||
return shajs('sha256')
|
||||
.update(JSON.stringify(sql))
|
||||
.digest('hex');
|
||||
}
|
||||
|
||||
setShaSum(type, schema, name, shaSum) {
|
||||
if (!shaSum) {
|
||||
this.deleteShaSum(type, schema, name);
|
||||
return;
|
||||
}
|
||||
|
||||
const shaSums = this.shaSums;
|
||||
if (!shaSums[schema])
|
||||
shaSums[schema] = {};
|
||||
|
|
|
@ -561,6 +561,11 @@ const tokens = {
|
|||
end: '\'',
|
||||
escape: char => char == '\'' || char == '\\'
|
||||
},
|
||||
quotedString: {
|
||||
start: '"',
|
||||
end: '"',
|
||||
escape: char => char == '"' || char == '\\'
|
||||
},
|
||||
id: {
|
||||
start: '`',
|
||||
end: '`',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "myvc",
|
||||
"version": "1.3.6",
|
||||
"version": "1.3.7",
|
||||
"author": "Verdnatura Levante SL",
|
||||
"description": "MySQL Version Control",
|
||||
"license": "GPL-3.0",
|
||||
|
|
Loading…
Reference in New Issue