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

问题反馈:Op.startsWith 方法在检索数据库时,无法区分字段类型为字符串的 '1_' 和 '13_' #57

Open
924950698 opened this issue Oct 10, 2020 · 1 comment
Labels

Comments

@924950698
Copy link

924950698 commented Oct 10, 2020

当前使用的 Node.js 版本 (node -v)
v14.13.1

当前使用的 sequelize 版本
"egg-sequelize": "^6.0.0"

问题描述
在调用Op.startsWith 方法在检索数据库时,无法区分字段类型为字符串的 '1_' 和 '13_';
image
执行该语句会返回所有满足1_的数据,比如1_1 和 13_1,sequelize有提供精准匹配的like语句吗?

@924950698
Copy link
Author

[Op.regexp]: [^${len[i].id}_], // Op.startsWith 无法区分 1_ 与 12_

@924950698 924950698 reopened this Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant