mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-04 13:18:55 +08:00
fix: missing isTruly/isFalsy filter operators #390
This commit is contained in:
parent
c95889aec2
commit
e596e6d365
18
packages/core/database/src/operators/boolean.ts
Normal file
18
packages/core/database/src/operators/boolean.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Op } from 'sequelize';
|
||||
|
||||
export default {
|
||||
$isFalsy() {
|
||||
return {
|
||||
[Op.or]: {
|
||||
[Op.is]: null,
|
||||
[Op.eq]: false,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
$isTruly() {
|
||||
return {
|
||||
[Op.eq]: true,
|
||||
};
|
||||
},
|
||||
};
|
@ -6,4 +6,5 @@ export default {
|
||||
...require('./string').default,
|
||||
...require('./ne').default,
|
||||
...require('./notIn').default,
|
||||
...require('./boolean').default,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user