mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-27 11:25:59 +00:00
bit filters
This commit is contained in:
@@ -135,6 +135,8 @@ const createParser = (filterType: FilterType) => {
|
|||||||
notEmpty: (r) => r.not.then(r.empty).map(unaryCondition('isNotEmpty')),
|
notEmpty: (r) => r.not.then(r.empty).map(unaryCondition('isNotEmpty')),
|
||||||
true: () => word('TRUE').map(binaryFixedValueCondition(1)),
|
true: () => word('TRUE').map(binaryFixedValueCondition(1)),
|
||||||
false: () => word('FALSE').map(binaryFixedValueCondition(0)),
|
false: () => word('FALSE').map(binaryFixedValueCondition(0)),
|
||||||
|
trueNum: () => word('1').map(binaryFixedValueCondition(1)),
|
||||||
|
falseNum: () => word('0').map(binaryFixedValueCondition(0)),
|
||||||
eq: (r) => word('=').then(r.value).map(binaryCondition('=')),
|
eq: (r) => word('=').then(r.value).map(binaryCondition('=')),
|
||||||
ne: (r) => word('!=').then(r.value).map(binaryCondition('<>')),
|
ne: (r) => word('!=').then(r.value).map(binaryCondition('<>')),
|
||||||
lt: (r) => word('<').then(r.value).map(binaryCondition('<')),
|
lt: (r) => word('<').then(r.value).map(binaryCondition('<')),
|
||||||
@@ -170,7 +172,7 @@ const createParser = (filterType: FilterType) => {
|
|||||||
'endsWithNot',
|
'endsWithNot',
|
||||||
'containsNot'
|
'containsNot'
|
||||||
);
|
);
|
||||||
if (filterType == 'logical') allowedElements.push('true', 'false');
|
if (filterType == 'logical') allowedElements.push('true', 'false', 'trueNum', 'falseNum');
|
||||||
|
|
||||||
// must be last
|
// must be last
|
||||||
if (filterType == 'string') allowedElements.push('valueTestStr');
|
if (filterType == 'string') allowedElements.push('valueTestStr');
|
||||||
|
|||||||
Reference in New Issue
Block a user