Class TrimFunction
java.lang.Object
org.datanucleus.store.query.inmemory.method.TrimFunction
- All Implemented Interfaces:
InvocationEvaluator
Evaluator for the function TRIM(strExpr).
If the method is TRIM trims both ends. If the method is TRIM_LEADING trims just the start.
If the method is TRIM_TRAILING trims just the end. The first parameter of the expression
is the string to trim. An optional second parameter is the trim character to trim (default
to ' ' if not specified).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate
(InvokeExpression expr, Object invokedValue, InMemoryExpressionEvaluator eval) Method to evaluate the InvokeExpression, as part of the overall evaluation defined by the InMemoryExpressionEvaluator.
-
Constructor Details
-
TrimFunction
public TrimFunction()
-
-
Method Details
-
evaluate
public Object evaluate(InvokeExpression expr, Object invokedValue, InMemoryExpressionEvaluator eval) Description copied from interface:InvocationEvaluator
Method to evaluate the InvokeExpression, as part of the overall evaluation defined by the InMemoryExpressionEvaluator.- Specified by:
evaluate
in interfaceInvocationEvaluator
- Parameters:
expr
- The expression for invocationinvokedValue
- Value on which we are invokingeval
- The overall evaluator for in-memory- Returns:
- The result
-