File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
packages/server/src/complete Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ export function createAliasCandidates(
7
7
token : string
8
8
) : CompletionItem [ ] {
9
9
return fromNodes
10
- . map ( ( fromNode ) => fromNode . as )
10
+ . map (
11
+ ( fromNode ) => fromNode . as ?? ( 'table' in fromNode ? fromNode . table : null )
12
+ )
11
13
. filter ( ( aliasName ) => aliasName && aliasName . startsWith ( token ) )
12
14
. map ( ( aliasName ) => toCompletionItemForAlias ( aliasName || '' ) )
13
15
}
Original file line number Diff line number Diff line change @@ -327,7 +327,6 @@ class Completer {
327
327
// Could be an alias or an unscoped column
328
328
this . addCandidatesForUnscopedColumns ( fromNodes , schemaAndSubqueries )
329
329
this . addCandidatesForAliases ( fromNodes )
330
- this . addCandidatesForTables ( schemaAndSubqueries , true )
331
330
this . addCandidatesForFunctions ( )
332
331
}
333
332
}
You can’t perform that action at this time.
0 commit comments