Package org.firebirdsql.jdbc.escape

## Class FBEscapedFunctionHelper

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

-     @InternalApi
      public final class FBEscapedFunctionHelper
      extends java.lang.Object

  Helper class for escaped functions.
  Author:
    Roman Rokytskyy, Mark Rotteveel

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static java.lang.String` | `convertTemplate​(java.lang.String functionCall)` | Convert escaped function call using function template.
    `static java.util.Set<java.lang.String>` | `getSupportedNumericFunctions()` |
    `static java.util.Set<java.lang.String>` | `getSupportedStringFunctions()` |
    `static java.util.Set<java.lang.String>` | `getSupportedSystemFunctions()` |
    `static java.util.Set<java.lang.String>` | `getSupportedTimeDateFunctions()` |
    `static java.util.List<java.lang.String>` | `parseArguments​(java.lang.String functionCall)` | Extract function arguments from the function call.
    `static java.lang.String` | `parseFunction​(java.lang.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 Detail

    - #### parseFunction

          public static java.lang.String parseFunction​(java.lang.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 java.util.List<java.lang.String> parseArguments​(java.lang.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 java.lang.String convertTemplate​(java.lang.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 java.util.Set<java.lang.String> getSupportedNumericFunctions()

      Returns:
        Set of JDBC numeric functions supported (as defined in appendix C.1 of JDBC 4.3)

    - #### getSupportedStringFunctions

          public static java.util.Set<java.lang.String> getSupportedStringFunctions()

      Returns:
        Set of JDBC string functions supported (as defined in appendix C.2 of JDBC 4.3)

    - #### getSupportedTimeDateFunctions

          public static java.util.Set<java.lang.String> getSupportedTimeDateFunctions()

      Returns:
        Set of JDBC time and date functions supported (as defined in appendix C.3 of JDBC 4.3)

    - #### getSupportedSystemFunctions

          public static java.util.Set<java.lang.String> getSupportedSystemFunctions()

      Returns:
        Set of JDBC system functions supported (as defined in appendix C.4 of JDBC 4.3)