Closed michael-dean-haynie closed 2 years ago
The IBM-style filter and() and or() operators should be nestable. This works for the @bitovi/sequelize-querystring-parser package but not for the @bitovi/objection-querystring-parser package.
and()
or()
@bitovi/sequelize-querystring-parser
@bitovi/objection-querystring-parser
Steps to Reproduce
// formatted readable version filter=or( equals(id,'1'), and( equals(id,'2'), greaterThan(id,'0') ) )
// inline version filter=or(equals(id,‘1’),and(equals(id,‘2’),greaterThan(id,‘0’)))
3. The obj lib returns the following: ``` json { "results": [ { "fx": "where", "parameters": [ "id", "=", 1 ] }, { "fx": "where", "parameters": [ "id", "=", 2 ] }, { "fx": "where", "parameters": [ "id", ">", 0 ] } ] }
Acceptance Criteria
NOTE: #29 is dependent on this nesting logic working because the not() operator uses a nested sub-expression.
not()
The IBM-style filter
and()
andor()
operators should be nestable. This works for the@bitovi/sequelize-querystring-parser
package but not for the@bitovi/objection-querystring-parser
package.Steps to Reproduce
// inline version filter=or(equals(id,‘1’),and(equals(id,‘2’),greaterThan(id,‘0’)))
Acceptance Criteria
@bitovi/objection-querystring-parser
should support arbitrarily deeply nested sub-expressions usingand()
andor()
operators.@bitovi/objection-querystring-parser
readme.NOTE: #29 is dependent on this nesting logic working because the
not()
operator uses a nested sub-expression.