File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/server/src/complete/candidates Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ import { ICONS } from '../CompletionItemUtils'
9
9
* @param table
10
10
* @returns
11
11
*/
12
- function allTableNameCombinations ( table : Table ) : string [ ] {
13
- if ( table . catalog ) {
14
- return [ table . catalog + '.' + table . database + '.' + table . tableName ]
12
+ function getFullyQualifiedTableName ( table : Table ) : string {
13
+ if ( table . catalog && table . database ) {
14
+ return table . catalog + '.' + table . database + '.' + table . tableName
15
15
}
16
16
if ( table . database ) {
17
- return [ table . database + '.' + table . tableName ]
17
+ return table . database + '.' + table . tableName
18
18
}
19
- return [ table . tableName ]
19
+ return table . tableName
20
20
}
21
21
22
22
export function createTableCandidates (
@@ -37,7 +37,7 @@ export function createTableCandidates(
37
37
const qualificationLevelNeeded = qualificationNeeded - qualificationLevel
38
38
switch ( qualificationLevelNeeded ) {
39
39
case 0 :
40
- return allTableNameCombinations ( table )
40
+ return [ getFullyQualifiedTableName ( table ) ]
41
41
case 1 :
42
42
if ( table . catalog && table . database ) {
43
43
return [ table . catalog + '.' + table . database ]
You can’t perform that action at this time.
0 commit comments