Skip to content

Commit

Permalink
Surport for using a regular expression with =~ to filter words.
Browse files Browse the repository at this point in the history
Surport for using a regular expression with =~ to filter words.
For Filter Method .contain().
  • Loading branch information
hopecee committed Jan 11, 2018
1 parent 9ed0bce commit 7faeb30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/org/datanucleus/query/JDOQLQueryHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ else if (dyExpr.getOperator() == Expression.OP_DISTINCT)
{
// Processed above
}
else if (dyExpr.getOperator() == Expression.OP_CONTAIN)
{
str.append(" =~ ");
}

else
{
// TODO Support other operators
Expand Down Expand Up @@ -314,4 +319,4 @@ else if (value instanceof Boolean)
throw new UnsupportedOperationException("Dont currently support " + expr.getClass().getName() + " in JDOQLHelper");
}
}
}
}

0 comments on commit 7faeb30

Please sign in to comment.