Aliases #3

Merged
jusax23 merged 10 commits from dev into main 2023-02-18 15:47:44 +01:00
2 changed files with 6 additions and 1 deletions
Showing only changes of commit d342aab539 - Show all commits

View file

@ -42,6 +42,9 @@ export class TableAlias {
this.dbLangTableAttributes[a.name] = attrAlias;
}
}
serializeAlias(hander: Handler) {
return this.dbLangTableInstance.serialize(hander) + " " + this.toString(hander);
}
serialize(handler: Handler) {
return this.toString(handler);
}

View file

@ -241,8 +241,10 @@ export class Handler {
builder.addCode(` from `);
if (q.from == null) {
builder.addCode(" DUAL");
} else if (q.from instanceof Table || q.from instanceof TableAlias) {
} else if (q.from instanceof Table) {
builder.addCode(q.from.serialize(handler));
} else if (q.from instanceof TableAlias) {
builder.addCode(q.from.serializeAlias(handler));
} else {
builder.append(q.from.serialize(handler));
}