org.datanucleus.store.rdbms.sql.method
Class StringSimilarPostgresqlMethod
java.lang.Object
org.datanucleus.store.rdbms.sql.method.AbstractSQLMethod
org.datanucleus.store.rdbms.sql.method.StringMatchesMethod
org.datanucleus.store.rdbms.sql.method.StringSimilarPostgresqlMethod
- All Implemented Interfaces:
- SQLMethod
public class StringSimilarPostgresqlMethod
- extends StringMatchesMethod
Support for a String.matches like functionality but using Postgresql's "SIMILAR TO" operator.
This is mapped to the Java function "String.similarTo" as an extension so it is available for use.
A unit test fails if trying to use it as String.matches.
|
Field Summary |
static org.datanucleus.query.expression.Expression.DyadicOperator |
OP_SIMILAR_TO
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OP_SIMILAR_TO
public static final org.datanucleus.query.expression.Expression.DyadicOperator OP_SIMILAR_TO
StringSimilarPostgresqlMethod
public StringSimilarPostgresqlMethod()
getExpressionForStringExpressionInput
protected BooleanExpression getExpressionForStringExpressionInput(SQLExpression expr,
SQLExpression regExpr,
SQLExpression escapeExpr)
- Overrides:
getExpressionForStringExpressionInput in class StringMatchesMethod
getBooleanLikeExpression
protected BooleanExpression getBooleanLikeExpression(SQLExpression expr,
SQLExpression regExpr,
SQLExpression escapeExpr)
- Overrides:
getBooleanLikeExpression in class StringMatchesMethod
Copyright © 2012. All Rights Reserved.