Class CurrentFunction

    • Method Detail

      • alwaysIncludesParentheses

        public boolean alwaysIncludesParentheses()
        Description copied from interface: SqmFunctionDescriptor
        Will a call to the described function always include parentheses?

        Instances of this interface are usually used for rendering of functions. However, there are cases where Hibernate needs to consume a fragment and decide if a token represents a function name. In cases where the token is followed by an opening parenthesis, we can safely assume the token is a function name. Bur if the next token is not an opening parenthesis, the token might still represent a function if the function has a "no paren" form in the case of no arguments.

        For example, many databases do not require parentheses for functions like current_timestamp and friends. This method helps account for those cases.

        Returns:
        true by default