Repository navigation
fix: upgrade SQL parser to 0.1.22 and align editor completion and highlighting - #630
Merged
Merged
Conversation
… editor - Accepting a suggestion inside a backtick-quoted name (SELECT * FROM `tra) inserted "trades " and left the backtick open. Backtick names are now handled like double-quoted ones and closed with the quote that opened them. - "--" or "/*" inside a backtick name (FROM `my--table` WHERE) was taken as the start of a comment, so no suggestions were shown. - Block comments nest in QuestDB: after the inner "*/" of "/* outer /* inner */" the cursor is still in the comment, so no suggestions are shown there.
…ntents - Block comments nest: text after an inner "*/" stays a comment. - A backtick-quoted name is colored as an identifier (`order` no longer looks like a keyword). - Number literals follow the @questdb/sql-parser lexer, so 1.5f, 1e36d, 10L, 1.5e3m, 100ns, 0.0 and 1_000 are each one number. A leading sign is an operator, as in the parser (previously "v+10" colored "+10" as a number). - E'...' is a string; $1 and :name are variables. "::" stays the cast operator, and ":" inside [...] stays a slice separator. - Inside ARRAY[...] and other square brackets, functions, CASE words, names and operators are colored like everywhere else.
Web Console deploy preview
|
Replace misspelled quoted names containing spaces without consuming following SQL. Suppress suggestions inside unfinished single-quoted strings and retain completion after closed strings. Cover dot-qualified and quoted insertion in unit and browser tests.
Member
Author
PR #630 review — level 3PR: fix: upgrade SQL parser to 0.1.22 and align editor completion and highlighting Base: Issues
Adjacent findings (not blocking — file as issues)None admitted. Summary
|
javier
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade
@questdb/sql-parserfrom 0.1.20 to the published 0.1.22 release and update the lockfile. Combine the parser improvements from questdb/sql-parser#42 with the console changes needed for completion insertion and highlighting.Parser upgrade
pg_catalog., with table-valued functions in FROM/JOIN and scalar functions in expressions.information_schema.*suggestions to prefix/suffix matches or an explicit namespace. TypingSELECTno longer exposes loose fuzzy matches.Editor changes
orderno longer receive keyword styling. Identifier styling uses the theme's default text color.arr[:1]contains a bind, whilearr[: 5]andarr[1:n]contain slice operators. Leading signs and::retain operator styling.The QuestDB test submodule is also updated. The parser dependency is an exact npm version; the PR contains no local file link.
Validation
@questdb/sql-parser@0.1.22installed withyarn install --immutable.