Module org.firebirdsql.jaybird
Package org.firebirdsql.jdbc.escape

# Class FBEscapedFunctionHelper

java.lang.Object
org.firebirdsql.jdbc.escape.FBEscapedFunctionHelper

@InternalApi public final class FBEscapedFunctionHelper extends Object
Helper class for escaped functions.

Author:
  Roman Rokytskyy, Mark Rotteveel

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static @Nullable String`
  `convertTemplate(String functionCall)`
  Convert escaped function call using function template.
  `static Set<String>`
  `getSupportedNumericFunctions()`
  `static Set<String>`
  `getSupportedStringFunctions()`
  `static Set<String>`
  `getSupportedSystemFunctions()`
  `static Set<String>`
  `getSupportedTimeDateFunctions()`
  `static List<String>`
  `parseArguments(String functionCall)`
  Extract function arguments from the function call.
  `static String`
  `parseFunction(String functionCall)`
  Extract function name from the function call.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### parseFunction

    public static String parseFunction(String functionCall) throws FBSQLParseException
    Extract function name from the function call.
    Parameters:
      `functionCall` - escaped function call.
    Returns:
      name of the function.
    Throws:
      `FBSQLParseException` - if parse error occurs.

  - ### parseArguments

    public static List<String> parseArguments(String functionCall) throws FBSQLParseException
    Extract function arguments from the function call. This method parses escaped function call string and extracts function parameters from it.
    Parameters:
      `functionCall` - escaped function call.
    Returns:
      list of parameters of the function.
    Throws:
      `FBSQLParseException` - if parse error occurs.

  - ### convertTemplate

    public static @Nullable String convertTemplate(String functionCall) throws FBSQLParseException
    Convert escaped function call using function template.
    Parameters:
      `functionCall` - escaped function call.
    Returns:
      server-side representation of the function call or `null` if no template found.
    Throws:
      `FBSQLParseException` - if escaped function call has incorrect syntax.

  - ### getSupportedNumericFunctions

    public static Set<String> getSupportedNumericFunctions()
    Returns:
      Set of JDBC numeric functions supported (as defined in appendix C.1 of JDBC 4.3)

  - ### getSupportedStringFunctions

    public static Set<String> getSupportedStringFunctions()
    Returns:
      Set of JDBC string functions supported (as defined in appendix C.2 of JDBC 4.3)

  - ### getSupportedTimeDateFunctions

    public static Set<String> getSupportedTimeDateFunctions()
    Returns:
      Set of JDBC time and date functions supported (as defined in appendix C.3 of JDBC 4.3)

  - ### getSupportedSystemFunctions

    public static Set<String> getSupportedSystemFunctions()
    Returns:
      Set of JDBC system functions supported (as defined in appendix C.4 of JDBC 4.3)