File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/server/src/complete Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,8 @@ class Completer {
245245 this . addCandidatesForSelectStar ( fromNodes , schemaAndSubqueries )
246246 const expectedLiteralNodes =
247247 e . expected ?. filter (
248- ( v ) : v is ExpectedLiteralNode => v . type === 'literal'
248+ ( v ) : v is ExpectedLiteralNode =>
249+ v . type === 'literal' && hasAtLeastTwoLetters ( v . text )
249250 ) || [ ]
250251 this . addCandidatesForExpectedLiterals ( expectedLiteralNodes )
251252 this . addCandidatesForFunctions ( )
@@ -428,3 +429,7 @@ export function complete(
428429 console . timeEnd ( 'complete' )
429430 return { candidates : candidates , error : completer . error }
430431}
432+
433+ function hasAtLeastTwoLetters ( value : string ) : boolean {
434+ return / [ a - z A - Z ] .* [ a - z A - Z ] / . test ( value )
435+ }
You can’t perform that action at this time.
0 commit comments