fix(basic.gblib): Allow MERGE keyword in storage #380. @othonlima

This commit is contained in:
Rodrigo Rodriguez 2023-11-23 19:53:38 -03:00
parent 0c9d7a40ae
commit a5722b95a2
2 changed files with 2 additions and 2 deletions

View file

@ -243,7 +243,7 @@ export class GBVMService extends GBService {
let obj = t.fields[key];
obj.type = getTypeBasedOnCondition(obj.type);
if (obj.type.key === "TABLE") {
obj.type.key = "INTEGER"
obj.type.key = "BIGINT"
associations.push({ from: t.name, to: obj.type.name });
}
if (key.toLowerCase() === 'id') {

View file

@ -226,7 +226,7 @@ export class KeywordsExpressions {
($0, $1, $2) => {
let tableName = /\s*FROM\s*(\w+\$*)/.exec($2)[1];
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`;
}
];