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 @@ -244,7 +244,8 @@ class Completer {
244244 this . addCandidatesForSelectStar ( fromNodes , schemaAndSubqueries )
245245 const expectedLiteralNodes =
246246 e . expected ?. filter (
247- ( v ) : v is ExpectedLiteralNode => v . type === 'literal'
247+ ( v ) : v is ExpectedLiteralNode =>
248+ v . type === 'literal' && hasAtLeastTwoLetters ( v . text )
248249 ) || [ ]
249250 this . addCandidatesForExpectedLiterals ( expectedLiteralNodes )
250251 this . addCandidatesForFunctions ( )
@@ -419,3 +420,7 @@ export function complete(
419420 console . timeEnd ( 'complete' )
420421 return { candidates : candidates , error : completer . error }
421422}
423+
424+ function hasAtLeastTwoLetters ( value : string ) : boolean {
425+ return / [ a - z A - Z ] .* [ a - z A - Z ] / . test ( value )
426+ }
You can’t perform that action at this time.
0 commit comments