@@ -93,10 +93,9 @@ async function getObjectColumns(
93
93
94
94
const cacheKey = toKey ( `columns` , schema + name )
95
95
const tableUpdate : boolean = changedCache . delete ( cacheKey ) ;
96
- const cached = completionItemCache . get ( cacheKey ) ;
97
96
const isCached = completionItemCache . has ( cacheKey ) ;
98
97
99
- if ( cached === undefined || tableUpdate ) {
98
+ if ( ! isCached || tableUpdate ) {
100
99
schema = Statement . noQuotes ( Statement . delimName ( schema , true ) ) ;
101
100
name = Statement . noQuotes ( Statement . delimName ( name , true ) ) ;
102
101
@@ -106,7 +105,6 @@ async function getObjectColumns(
106
105
const resultSet = await Callable . getResultColumns ( schema , name , true ) ;
107
106
108
107
if ( ! resultSet ?. length ? true : false ) {
109
- console . log ( `Set: ${ cacheKey } , length: ${ resultSet . length } ` ) ;
110
108
completionItemCache . set ( cacheKey , [ ] ) ;
111
109
return [ ] ;
112
110
}
@@ -125,7 +123,6 @@ async function getObjectColumns(
125
123
const columns = await Table . getItems ( schema , name ) ;
126
124
127
125
if ( ! columns ?. length ? true : false ) {
128
- console . log ( `Set: ${ cacheKey } , length: ${ columns . length } ` ) ;
129
126
completionItemCache . set ( cacheKey , [ ] ) ;
130
127
return [ ] ;
131
128
}
@@ -143,9 +140,9 @@ async function getObjectColumns(
143
140
144
141
const allCols = getAllColumns ( name , schema , completionItems ) ;
145
142
completionItems . push ( allCols ) ;
146
- console . log ( `Set: ${ cacheKey } , length: ${ completionItems . length } ` ) ;
147
143
completionItemCache . set ( cacheKey , completionItems ) ;
148
144
}
145
+
149
146
return completionItemCache . get ( cacheKey ) ;
150
147
}
151
148
@@ -178,7 +175,6 @@ async function getObjectCompletions(
178
175
. map ( ( result ) => ( result as PromiseFulfilledResult < any > ) . value )
179
176
. flat ( ) ;
180
177
181
- console . log ( `Set: ${ forSchema } , length: ${ list . length } ` ) ;
182
178
completionItemCache . set ( forSchema , list ) ;
183
179
}
184
180
return completionItemCache . get ( forSchema ) ;
0 commit comments