-
Notifications
You must be signed in to change notification settings - Fork 83
feat(webui): Modify ANTLR grammar to support parsing individual SQL fields. #1521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bf8af6a
33f4afe
5712c89
9ea5cc0
b5bb540
04e5bdd
6df59b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,23 @@ | ||||||||||||||||||||||||||||||||||
| grammar Sql; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| import SqlBase; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| selectItemList | ||||||||||||||||||||||||||||||||||
| : selectItem (',' selectItem)* | ||||||||||||||||||||||||||||||||||
| ; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| standaloneSelectItemList | ||||||||||||||||||||||||||||||||||
| : selectItemList EOF | ||||||||||||||||||||||||||||||||||
| ; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| standaloneBooleanExpression | ||||||||||||||||||||||||||||||||||
| : booleanExpression EOF | ||||||||||||||||||||||||||||||||||
| ; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| sortItemList | ||||||||||||||||||||||||||||||||||
| : sortItem (',' sortItem)* | ||||||||||||||||||||||||||||||||||
| ; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| standaloneSortItemList | ||||||||||||||||||||||||||||||||||
| : sortItemList EOF | ||||||||||||||||||||||||||||||||||
| ; | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+17
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial LGTM: Consistent pattern for ORDER BY clause parsing. The rules follow the same pattern as the SELECT item rules, providing a clean, consistent approach for parsing ORDER BY clause fragments with proper EOF handling. Consider adding documentation similar to the SELECT rules: +// Parse a comma-separated list of ORDER BY sort items (e.g., "col1 ASC, col2 DESC")
sortItemList
: sortItem (',' sortItem)*
;
+// Standalone entry point for parsing ORDER BY items in isolation
standaloneSortItemList
: sortItemList EOF
;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Consider adding documentation comments.
The grammar rules are well-structured for parsing SELECT clause fragments. However, adding comments would improve maintainability and clarify the intended usage for future syntax highlighting.
Consider adding documentation:
📝 Committable suggestion
🤖 Prompt for AI Agents