Skip to content

Commit f08b557

Browse files
committed
Don't suggest automatic table aliasing insert text
1 parent 7d59425 commit f08b557

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/server/src/complete/Identifier.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,12 @@ export class Identifier {
4646
const idx = this.lastToken.lastIndexOf('.')
4747
const label = this.identifier.substring(idx + 1)
4848
let kindName: string
49-
let tableAlias = ''
5049
if (this.kind === ICONS.TABLE) {
5150
let tableName = label
5251
const i = tableName.lastIndexOf('.')
5352
if (i > 0) {
5453
tableName = label.substring(i + 1)
5554
}
56-
tableAlias = this.onClause === 'FROM' ? makeTableAlias(tableName) : ''
5755
kindName = 'table'
5856
} else {
5957
kindName = 'column'
@@ -66,11 +64,7 @@ export class Identifier {
6664
}
6765

6866
if (this.kind === ICONS.TABLE) {
69-
if (tableAlias) {
70-
item.insertText = `${label} AS ${tableAlias}`
71-
} else {
72-
item.insertText = label
73-
}
67+
item.insertText = label
7468
}
7569
return item
7670
}

0 commit comments

Comments
 (0)