Skip to content
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

将生成 SQL 中 String 类型值包含「'」(单引号)的地方转换为「\'」 #9

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

zitongchen
Copy link
Contributor

将生成 SQL 中 String 类型值包含「'」(单引号)的地方转换为「'」,避免生成的 SQL 格式错误,导致无法执行。

# 调整前生成的语句(存在语法错误)
UPDATE user SET `name` = '李四'王五' WHERE `id` = 1; 
# 调整后生成的语句
UPDATE user SET `name` = '李四\'王五' WHERE `id` = 1; 

@zhuchao941 zhuchao941 merged commit 8ef9c63 into zhuchao941:main Jul 3, 2024
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.

2 participants