fix(basic.gblib): Allow MERGE keyword in storage #380. @othonlima
This commit is contained in:
parent
0c9d7a40ae
commit
a5722b95a2
2 changed files with 2 additions and 2 deletions
|
@ -243,7 +243,7 @@ export class GBVMService extends GBService {
|
||||||
let obj = t.fields[key];
|
let obj = t.fields[key];
|
||||||
obj.type = getTypeBasedOnCondition(obj.type);
|
obj.type = getTypeBasedOnCondition(obj.type);
|
||||||
if (obj.type.key === "TABLE") {
|
if (obj.type.key === "TABLE") {
|
||||||
obj.type.key = "INTEGER"
|
obj.type.key = "BIGINT"
|
||||||
associations.push({ from: t.name, to: obj.type.name });
|
associations.push({ from: t.name, to: obj.type.name });
|
||||||
}
|
}
|
||||||
if (key.toLowerCase() === 'id') {
|
if (key.toLowerCase() === 'id') {
|
||||||
|
|
|
@ -226,7 +226,7 @@ export class KeywordsExpressions {
|
||||||
($0, $1, $2) => {
|
($0, $1, $2) => {
|
||||||
let tableName = /\s*FROM\s*(\w+\$*)/.exec($2)[1];
|
let tableName = /\s*FROM\s*(\w+\$*)/.exec($2)[1];
|
||||||
let sql = `SELECT ${$2}`.replace(tableName, '?');
|
let sql = `SELECT ${$2}`.replace(tableName, '?');
|
||||||
return `${$1} = await sys.executeSQL({pid: pid, data:${$1}, sql:"${sql}", tableName:"${tableName}"})\n`;
|
return `${$1} = await sys.executeSQL({pid: pid, data:${tableName}, sql:"${sql}"})\n`;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue