Aliases #3
2 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue