From 096cbc13d858115a3add35c7db67886bb1d1b4cf Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sun, 12 Jun 2022 11:14:39 +0200 Subject: [PATCH] fixed filter bool values in postgres --- packages/filterparser/src/parseFilter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/filterparser/src/parseFilter.ts b/packages/filterparser/src/parseFilter.ts index 7afa36eb..9d170a6f 100644 --- a/packages/filterparser/src/parseFilter.ts +++ b/packages/filterparser/src/parseFilter.ts @@ -223,10 +223,10 @@ const createParser = (filterType: FilterType) => { null: () => word('NULL').map(unaryCondition('isNull')), empty: () => word('EMPTY').map(unaryCondition('isEmpty')), notEmpty: r => r.not.then(r.empty).map(unaryCondition('isNotEmpty')), - true: () => P.regexp(/true/i).map(binaryFixedValueCondition(1)), - false: () => P.regexp(/false/i).map(binaryFixedValueCondition(0)), - trueNum: () => word('1').map(binaryFixedValueCondition(1)), - falseNum: () => word('0').map(binaryFixedValueCondition(0)), + true: () => P.regexp(/true/i).map(binaryFixedValueCondition('1')), + false: () => P.regexp(/false/i).map(binaryFixedValueCondition('0')), + trueNum: () => word('1').map(binaryFixedValueCondition('1')), + falseNum: () => word('0').map(binaryFixedValueCondition('0')), this: () => word('THIS'), last: () => word('LAST'),