Class StringSimilarPostgresqlMethod
java.lang.Object
org.datanucleus.store.rdbms.sql.method.StringMatchesMethod
org.datanucleus.store.rdbms.sql.method.StringSimilarPostgresqlMethod
- All Implemented Interfaces:
SQLMethod
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
FieldsModifier and TypeFieldDescriptionstatic final org.datanucleus.store.query.expression.Expression.DyadicOperator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BooleanExpressiongetBooleanLikeExpression(SQLStatement stmt, SQLExpression expr, SQLExpression regExpr, SQLExpression escapeExpr) protected BooleanExpressiongetExpressionForStringExpressionInput(SQLStatement stmt, SQLExpression expr, SQLExpression regExpr, SQLExpression escapeExpr) Methods inherited from class StringMatchesMethod
getExpression
-
Field Details
-
OP_SIMILAR_TO
public static final org.datanucleus.store.query.expression.Expression.DyadicOperator OP_SIMILAR_TO
-
-
Constructor Details
-
StringSimilarPostgresqlMethod
public StringSimilarPostgresqlMethod()
-
-
Method Details
-
getExpressionForStringExpressionInput
protected BooleanExpression getExpressionForStringExpressionInput(SQLStatement stmt, SQLExpression expr, SQLExpression regExpr, SQLExpression escapeExpr) - Overrides:
getExpressionForStringExpressionInputin classStringMatchesMethod
-
getBooleanLikeExpression
protected BooleanExpression getBooleanLikeExpression(SQLStatement stmt, SQLExpression expr, SQLExpression regExpr, SQLExpression escapeExpr) - Overrides:
getBooleanLikeExpressionin classStringMatchesMethod
-