Class PositionExpression<T,R>
- java.lang.Object
-
- org.apache.qpid.server.query.engine.parsing.expression.AbstractExpressionNode<T,R>
-
- org.apache.qpid.server.query.engine.parsing.expression.function.AbstractFunctionExpression<T,Integer>
-
- org.apache.qpid.server.query.engine.parsing.expression.function.string.PositionExpression<T,R>
-
- Type Parameters:
T- Input parameter typeR- Return parameter type
- All Implemented Interfaces:
Function<T,Integer>,Expression<T,Integer>,ExpressionNode<T,Integer>
public class PositionExpression<T,R> extends AbstractFunctionExpression<T,Integer>
POSITION takes a search pattern and a source string as parameters and returns the position of the first occurrence of a pattern in a source string. If the pattern is not found within the source string, this function returns 0. Optionally takes third integer parameter, defining from which position search should be started. Third parameter should be an integer greater than 0. If source string is null, returns zero.
-
-
Field Summary
-
Fields inherited from class org.apache.qpid.server.query.engine.parsing.expression.function.AbstractFunctionExpression
_functionName
-
Fields inherited from class org.apache.qpid.server.query.engine.parsing.expression.AbstractExpressionNode
_metadata
-
-
Constructor Summary
Constructors Constructor Description PositionExpression(String alias, List<ExpressionNode<T,?>> args)Constructor initializes children expression list
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integerapply(T value)Performs position operation using parameters and the value supplied-
Methods inherited from class org.apache.qpid.server.query.engine.parsing.expression.function.AbstractFunctionExpression
evaluateChild, getFunctionName, getOptionalConstantParameter, getOptionalParameter, getRequiredParameter
-
Methods inherited from class org.apache.qpid.server.query.engine.parsing.expression.AbstractExpressionNode
containsAggregation, ctx, evaluateChild, getAggregations, getAlias, getChild, getChildren, getParent, isAccessor, isInstantlyEvaluable, setAlias, setParent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.server.query.engine.parsing.expression.Expression
andThen
-
-
-
-
Constructor Detail
-
PositionExpression
public PositionExpression(String alias, List<ExpressionNode<T,?>> args)
Constructor initializes children expression list- Parameters:
alias- Expression aliasargs- List of children expressions
-
-