Skip to content

Commit

Permalink
Support for Filter method .contains()
Browse files Browse the repository at this point in the history
  • Loading branch information
hopecee authored Jan 13, 2018
1 parent b9768d5 commit f01cb9f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ else if (op == Expression.OP_LTEQ)
{
cypherText = propName + " <= " + lit.getCypherText();
}
else if (op == Expression.OP_CONTAINS)
{
cypherText = propName + " =~ '(?i).*" + lit.getCypherText()+".*'");
}
}

public Neo4jBooleanExpression(Neo4jBooleanExpression expr1, Neo4jBooleanExpression expr2, Expression.DyadicOperator op)
Expand Down Expand Up @@ -99,5 +103,9 @@ else if (op == Expression.OP_LTEQ)
{
cypherText = expr1.getCypherText() + " <= " + expr2.getCypherText();
}
else if (op == Expression.OP_CONTAINS)
{
cypherText = expr1.getCypherText() e + " =~ '(?i).*" + expr2.getCypherText() + ".*'");
}
}
}

0 comments on commit f01cb9f

Please sign in to comment.