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

新增了OR和AND等选项 #83

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

SimbaZZX
Copy link

@SimbaZZX SimbaZZX commented Dec 5, 2020

operator.js进行了简单的修改,新增了ORAND等选项,支持了like,大于小于、嵌套条件等

害,似乎缺少了 a<1 or a =2的操作 ,我的项目比较简单,没用到

调用示例如下:

where: {
                a: 1,
                b: [11, 22],
                OR: {
                    sender11: { op: 'like', value: `%111%` },
                    receiver22: { op: 'like', value: `%222%` },
                },
                AND: {
                    orderno: null,
                    id: 1,
                    role: ['admin', 'guest'],
                    OR: {
                        realname: { op: 'like', value: 'simba' },
                        age: { op: '>', value: '20' },
                        nickname: { op: 'like', value: 'ace' }
                    },
                    createtime: [
                        { op: '>', value: '2020-10-13' },
                        { op: '<', value: '2020-11-22' },
                    ]
                },
          }

@SimbaZZX SimbaZZX mentioned this pull request Dec 5, 2020
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