@Test public void one_$parent_$and_expression_case_insensitive_returns_true() throws Exception { QueryExpression q = EvalTestContext.queryExpressionFromJson("{'$and': [{'field':'field2.$parent.field1','regex':'Val.*','caseInsensitive':1},{'field':'field2.$parent.field3','op':'$eq','rvalue':3}]}"); QueryEvaluator qe = QueryEvaluator.getInstance(q, md); QueryEvaluationContext ctx = qe.evaluate(jsonDoc); Assert.assertTrue(ctx.getResult()); }
@Override public boolean evaluate(QueryEvaluationContext ctx) { LOGGER.debug("evaluate {}", operator); ctx.setResult(operator.apply(evaluator.evaluate(ctx))); return ctx.getResult(); }
UnaryLogicalExpressionEvaluator extends QueryEvaluator { @Override public boolean evaluate(QueryEvaluationContext ctx) { LOGGER.debug("evaluate {}", operator); ctx.setResult(operator.apply(evaluator.evaluate(ctx))); return ctx.getResult(); } }
UnaryLogicalExpressionEvaluator extends QueryEvaluator { @Override public boolean evaluate(QueryEvaluationContext ctx) { LOGGER.debug("evaluate {}", operator); ctx.setResult(operator.apply(evaluator.evaluate(ctx))); return ctx.getResult(); } UnaryLogicalExpressionEvaluator(UnaryLogicalExpression expr,
                                           FieldTreeNode context); }
UnaryLogicalExpressionEvaluator extends QueryEvaluator { @Override public boolean evaluate(QueryEvaluationContext ctx) { LOGGER.debug("evaluate {}", operator); ctx.setResult(operator.apply(evaluator.evaluate(ctx))); return ctx.getResult(); } UnaryLogicalExpressionEvaluator(UnaryLogicalExpression expr,
                                           FieldTreeNode context); @Override boolean evaluate(QueryEvaluationContext ctx); }
UnaryLogicalExpressionEvaluator extends QueryEvaluator { @Override public boolean evaluate(QueryEvaluationContext ctx) { LOGGER.debug("evaluate {}", operator); ctx.setResult(operator.apply(evaluator.evaluate(ctx))); return ctx.getResult(); } UnaryLogicalExpressionEvaluator(UnaryLogicalExpression expr,
                                           FieldTreeNode context); @Override boolean evaluate(QueryEvaluationContext ctx);  }