File tree Expand file tree Collapse file tree 2 files changed +1
-29
lines changed
Expand file tree Collapse file tree 2 files changed +1
-29
lines changed Original file line number Diff line number Diff line change @@ -908,11 +908,7 @@ export function getContentAssist(
908908 // problems than it solves (prefix filtering breaks, ambiguity with string values).
909909 const fullTokens = QuestDBLexer . tokenize ( fullSql ) . tokens
910910 for ( const token of fullTokens ) {
911- if (
912- token . tokenType . name !== "StringLiteral" &&
913- token . tokenType . name !== "QuotedIdentifier"
914- )
915- continue
911+ if ( token . tokenType . name !== "StringLiteral" ) continue
916912 const start = token . startOffset
917913 const end = token . startOffset + token . image . length
918914 if ( cursorOffset > start && cursorOffset < end ) {
Original file line number Diff line number Diff line change @@ -2771,30 +2771,6 @@ describe("CTE autocomplete", () => {
27712771 } )
27722772 } )
27732773
2774- describe ( "quoted identifier suppression" , ( ) => {
2775- it ( "should return no suggestions when cursor is inside a quoted identifier" , ( ) => {
2776- const sql = 'SELECT * FROM "my table"'
2777- const offset = sql . indexOf ( "my" ) + 1
2778- const suggestions = provider . getSuggestions ( sql , offset )
2779- expect ( suggestions ) . toHaveLength ( 0 )
2780- } )
2781-
2782- it ( "should return no suggestions inside a quoted column name" , ( ) => {
2783- const sql = 'SELECT "column name" FROM trades'
2784- const offset = sql . indexOf ( "column" ) + 3
2785- const suggestions = provider . getSuggestions ( sql , offset )
2786- expect ( suggestions ) . toHaveLength ( 0 )
2787- } )
2788-
2789- it ( "should suggest after a completed quoted identifier" , ( ) => {
2790- const sql = 'SELECT "symbol" '
2791- const suggestions = provider . getSuggestions ( sql , sql . length )
2792- const labels = suggestions . map ( ( s ) => s . label )
2793- expect ( labels . length ) . toBeGreaterThan ( 0 )
2794- expect ( labels ) . toContain ( "FROM" )
2795- } )
2796- } )
2797-
27982774 // ===========================================================================
27992775 // SELECT * edge cases
28002776 // ===========================================================================
You can’t perform that action at this time.
0 commit comments