Class LocateExpression

  • All Implemented Interfaces:
    Expression

    public final class LocateExpression
    extends AbstractTripleEncapsulatedExpression
    The LOCATE function returns the position of a given string within a string, starting the search at a specified position. It returns the first position at which the string was found as an integer. The first argument is the string to be located; the second argument is the string to be searched; the optional third argument is an integer that represents the string position at which the search is started (by default, the beginning of the string to be searched). The first position in a string is denoted by 1. If the string is not found, 0 is returned.

    JPA 1.0, 2.0:

    BNF: expression ::= LOCATE(string_primary, string_primary [, simple_arithmetic_expression])

    JPA 2.1:

    BNF: expression ::= LOCATE(string_expression, string_expression [, arithmetic_expression])

    Version:
    2.5
    Author:
    Pascal Filion
    Since:
    2.3
    • Constructor Detail

      • LocateExpression

        public LocateExpression​(AbstractExpression parent)
        Creates a new LocateExpression.
        Parameters:
        parent - The parent of this expression