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

如果构建动态复杂查询语句 #1252

Open
zsy619 opened this issue Jan 23, 2025 · 1 comment
Open

如果构建动态复杂查询语句 #1252

zsy619 opened this issue Jan 23, 2025 · 1 comment

Comments

@zsy619
Copy link

zsy619 commented Jan 23, 2025

Your Question

Image

检索条件 左侧分类 and (名称 or 编码 or 型号) ,如果名称、编码、型号有任意值,在构建检索条件,否则不进行检索,这样动态的查询语句如果构建?
如可能会出现如下情况:
分类=90 and (名称 like '%测试%' or 编码 like '%123%')
分类=90 and (名称 like '%测试%')
分类=90

建议增加一个OrAll函数,如下:
action = action.OrAll(qryBill.Name.Like('abc%'),qryBill.Code.Like('abc%')),构建一个 ( 表达式1 or 表达式2)

The document you expected this should be explained

Expected answer

@zsy619
Copy link
Author

zsy619 commented Jan 23, 2025

@jinzhu

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