Class RegexpFunction

All Implemented Interfaces:
ExpressionWithVariableParameters, NamedExpression, HasSQL, Typed

public final class RegexpFunction extends FunctionN
A regular expression function.
  • Field Details

    • REGEXP_LIKE

      public static final int REGEXP_LIKE
      REGEXP_LIKE() (non-standard).
      See Also:
    • REGEXP_REPLACE

      public static final int REGEXP_REPLACE
      REGEXP_REPLACE() (non-standard).
      See Also:
    • REGEXP_SUBSTR

      public static final int REGEXP_SUBSTR
      REGEXP_SUBSTR() (non-standard).
      See Also:
    • NAMES

      private static final String[] NAMES
    • function

      private final int function
  • Constructor Details

    • RegexpFunction

      public RegexpFunction(int function)
  • Method Details

    • getValue

      public Value getValue(SessionLocal session)
      Description copied from class: Expression
      Return the resulting value for the current row.
      Overrides:
      getValue in class FunctionN
      Parameters:
      session - the session
      Returns:
      the result
    • regexpReplace

      private static Value regexpReplace(SessionLocal session, String input, String regexp, String replacement, int position, int occurrence, String regexpMode)
    • regexpSubstr

      private static Value regexpSubstr(Value inputString, Value regexpArg, Value positionArg, Value occurrenceArg, Value regexpModeArg, Value subexpressionArg, SessionLocal session)
    • makeRegexpFlags

      private static int makeRegexpFlags(String stringFlags, boolean ignoreGlobalFlag)
    • optimize

      public Expression optimize(SessionLocal session)
      Description copied from class: Expression
      Try to optimize the expression.
      Specified by:
      optimize in class Expression
      Parameters:
      session - the session
      Returns:
      the optimized expression
    • getName

      public String getName()
      Description copied from interface: NamedExpression
      Get the name.
      Returns:
      the name in uppercase