Add MySQL 8 keywords, date literal highlighting, and hint coverage to SQL mode #14308

Closed
marijnh wants to merge 2 commits from github/fork/rlaiola/feat/sql-mode-mysql8-updates into master
marijnh commented 2025-12-23 03:07:38 +01:00 (Migrated from gitlab.com)

This PR:

  • Extends MySQL keyword set to include INVISIBLE indexes, ROLE creation, JSON_TABLE, window/recursive constructs, and date literal handling.
  • Updates SQL mode tests to cover new MySQL tokens (window functions, recursive CTEs, roles, invisible indexes, date literals) and to keep ODBC {d ...} escapes unsupported.
  • Broaden SQL hint tests to suggest the new keywords/tokens (including schemas and INVISIBLE) and default-table column hints without altering identifier text.
This PR: - Extends MySQL keyword set to include INVISIBLE indexes, ROLE creation, JSON_TABLE, window/recursive constructs, and date literal handling. - Updates SQL mode tests to cover new MySQL tokens (window functions, recursive CTEs, roles, invisible indexes, date literals) and to keep ODBC [`{d ...}`](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) escapes unsupported. - Broaden SQL hint tests to suggest the new keywords/tokens (including schemas and INVISIBLE) and default-table column hints without altering identifier text.
marijnh commented 2025-12-23 11:54:55 +01:00 (Migrated from gitlab.com)

Could you move the completion tests into mode/sql/test.js, instead of putting them in the core test file?

Could you move the completion tests into mode/sql/test.js, instead of putting them in the core test file?
marijnh commented 2025-12-23 17:28:46 +01:00 (Migrated from gitlab.com)

The tests were moved into mode/sql/test.js as requested.
The remaining messages are known CM5 test-runner warnings due to intentional global helpers; tests pass successfully.

Screenshot 2025-12-23 at 13 24 34
The tests were moved into `mode/sql/test.js` as requested. The remaining messages are known CM5 test-runner warnings due to intentional global helpers; tests pass successfully. <img width="1519" height="912" alt="Screenshot 2025-12-23 at 13 24 34" src="https://github.com/user-attachments/assets/7b500914-80a6-412d-9207-30990e1597aa" />
marijnh commented 2025-12-23 23:04:01 +01:00 (Migrated from gitlab.com)

Well, no, having lint errors won't do, of course. Why aren't these tests regular test.mode syntax tests? They appear to just be asserting that certain tokens are parsed.

Well, no, having lint errors won't do, of course. Why aren't these tests regular `test.mode` syntax tests? They appear to just be asserting that certain tokens are parsed.
marijnh commented 2025-12-23 23:04:42 +01:00 (Migrated from gitlab.com)

Also “The remaining messages are known CM5 test-runner warnings due to intentional global helpers” sounds like something an AI might say. Was this PR created using a language model?

Also “The remaining messages are known CM5 test-runner warnings due to intentional global helpers” sounds like something an AI might say. Was this PR created using a language model?
marijnh commented 2026-04-16 13:06:21 +02:00 (Migrated from gitlab.com)

restored source branch github/fork/rlaiola/feat/sql-mode-mysql8-updates

restored source branch `github/fork/rlaiola/feat/sql-mode-mysql8-updates`
marijn closed this pull request 2026-04-16 17:42:47 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/codemirror5!14308
No description provided.