mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 06:26:00 +00:00
fix: conditionally remove table aliases from column expressions
This commit is contained in:
@@ -253,7 +253,12 @@ export abstract class GridDisplay {
|
|||||||
orCondition.conditions.push(
|
orCondition.conditions.push(
|
||||||
_.cloneDeepWith(condition, (expr: Expression) => {
|
_.cloneDeepWith(condition, (expr: Expression) => {
|
||||||
if (expr.exprType == 'placeholder') {
|
if (expr.exprType == 'placeholder') {
|
||||||
return this.createColumnExpression(column, {}, undefined, 'filter');
|
return this.createColumnExpression(
|
||||||
|
column,
|
||||||
|
!this.dialect.omitTableAliases ? { alias: 'basetbl' } : undefined,
|
||||||
|
undefined,
|
||||||
|
'filter'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -599,7 +604,14 @@ export abstract class GridDisplay {
|
|||||||
name: _.pick(name, ['schemaName', 'pureName']),
|
name: _.pick(name, ['schemaName', 'pureName']),
|
||||||
...(!this.dialect.omitTableAliases && { alias: 'basetbl' }),
|
...(!this.dialect.omitTableAliases && { alias: 'basetbl' }),
|
||||||
},
|
},
|
||||||
columns: columns.map(col => this.createColumnExpression(col, {}, undefined, 'view')),
|
columns: columns.map(col =>
|
||||||
|
this.createColumnExpression(
|
||||||
|
col,
|
||||||
|
!this.dialect.omitTableAliases ? { alias: 'basetbl' } : undefined,
|
||||||
|
undefined,
|
||||||
|
'view'
|
||||||
|
)
|
||||||
|
),
|
||||||
orderBy: this.driver?.requiresDefaultSortCriteria
|
orderBy: this.driver?.requiresDefaultSortCriteria
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user