show added columns

This commit is contained in:
Jan Prochazka
2020-03-08 18:51:37 +01:00
parent 2e596cf24d
commit 8d731731b3
5 changed files with 98 additions and 16 deletions

View File

@@ -21,8 +21,13 @@ export class TableGridDisplay extends GridDisplay {
const orderColumnName = this.table.columns[0].columnName;
const select: Select = {
commandType: 'select',
from: { name: this.table },
columns: this.table.columns.map(col => ({ exprType: 'column', alias: col.columnName, ...col })),
from: { name: this.table, alias: 'basetbl' },
columns: this.table.columns.map(col => ({
exprType: 'column',
alias: col.columnName,
source: { alias: 'basetbl' },
...col,
})),
orderBy: [
{
exprType: 'column',
@@ -31,6 +36,7 @@ export class TableGridDisplay extends GridDisplay {
},
],
};
this.addJoinsFromExpandedColumns(select, this.columns, 'basetbl');
return select;
}