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

WHERE语句中出现uid列时解析语法树有问题 #765

Open
hzh2020 opened this issue Mar 5, 2024 · 0 comments
Open

WHERE语句中出现uid列时解析语法树有问题 #765

hzh2020 opened this issue Mar 5, 2024 · 0 comments

Comments

@hzh2020
Copy link

hzh2020 commented Mar 5, 2024

WHERE语句中出现uid列时解析语法树,导致判断语句解析失败。

To Reproduce
测试代码

sql_1 = 'SELECT * FROM users WHERE uid = 1 '
sql_2 = 'SELECT * FROM users WHERE id = 1 '
statement_1 = sqlparse.parse(sql_1)[0]
statement_2 = sqlparse.parse(sql_2)[0]

sql_1和sql_2解析不一致:
图片
图片

Expected behavior
应该都按照sql_2的解析方式

Versions (please complete the following information):

  • Python: 3.10.12
  • sqlparse: 0.4.4
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

No branches or pull requests

1 participant