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 {
244
244
this . addCandidatesForSelectStar ( fromNodes , schemaAndSubqueries )
245
245
const expectedLiteralNodes =
246
246
e . expected ?. filter (
247
- ( v ) : v is ExpectedLiteralNode => v . type === 'literal'
247
+ ( v ) : v is ExpectedLiteralNode =>
248
+ v . type === 'literal' && hasAtLeastTwoLetters ( v . text )
248
249
) || [ ]
249
250
this . addCandidatesForExpectedLiterals ( expectedLiteralNodes )
250
251
this . addCandidatesForFunctions ( )
@@ -419,3 +420,7 @@ export function complete(
419
420
console . timeEnd ( 'complete' )
420
421
return { candidates : candidates , error : completer . error }
421
422
}
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