Skip to content

feat(sql): escapes reserved words#1856

Open
chapmandu wants to merge 8 commits intowheels-dev:developfrom
chapmandu:chapmandu/mysql-escapeReservedWords
Open

feat(sql): escapes reserved words#1856
chapmandu wants to merge 8 commits intowheels-dev:developfrom
chapmandu:chapmandu/mysql-escapeReservedWords

Conversation

@chapmandu
Copy link
Contributor

@chapmandu chapmandu commented Feb 3, 2026

Ensures MySQL reserved words (like groups, order, key, etc.) are properly escaped with backticks when used as table names, preventing SQL syntax errors.

Changes:

$escapeReservedWords() in MySQL adapter checks table names against reserved word list
$fromClause() calls the adapter's escape function when building SQL
Test:

Added test: "escapes MySQL reserved word 'groups' in from clause"

This feature does not define reserved words for all db adapters, only MySQL

@chapmandu chapmandu changed the title feat(models): escapeReservedWords function feat(sql): escapes reserved words Feb 3, 2026
@chapmandu chapmandu marked this pull request as ready for review February 3, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant