fix: missing isTruly/isFalsy filter operators #390

This commit is contained in:
chenos 2022-05-20 12:18:46 +08:00
parent c95889aec2
commit e596e6d365
2 changed files with 19 additions and 0 deletions

View 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,
};
},
};

View File

@ -6,4 +6,5 @@ export default {
...require('./string').default, ...require('./string').default,
...require('./ne').default, ...require('./ne').default,
...require('./notIn').default, ...require('./notIn').default,
...require('./boolean').default,
}; };