Class SqlLibraryOperators


  • public abstract class SqlLibraryOperators
    extends java.lang.Object
    Defines functions and operators that are not part of standard SQL but belong to one or more other dialects of SQL.

    They are read by SqlLibraryOperatorTableFactory into instances of SqlOperatorTable that contain functions and operators for particular libraries.

    • Field Detail

      • CONVERT_TIMEZONE

        public static final SqlFunction CONVERT_TIMEZONE
        The "CONVERT_TIMEZONE(tz1, tz2, datetime)" function; converts the timezone of datetime from tz1 to tz2. This function is only on Redshift, but we list it in PostgreSQL because Redshift does not have its own library.
      • DECODE_RETURN_TYPE

        private static final SqlReturnTypeInference DECODE_RETURN_TYPE
        Return type inference for DECODE.
      • DECODE

        public static final SqlFunction DECODE
        The "DECODE(v, v1, result1, [v2, result2, ...], resultN)" function.
      • NVL

        public static final SqlFunction NVL
        The "NVL(value, value)" function.
      • LTRIM

        public static final SqlFunction LTRIM
        The "LTRIM(string)" function.
      • RTRIM

        public static final SqlFunction RTRIM
        The "RTRIM(string)" function.
      • SUBSTR

        public static final SqlFunction SUBSTR
        Oracle's "SUBSTR(string, position [, substringLength ])" function.

        It has similar semantics to standard SQL's SqlStdOperatorTable.SUBSTRING function but different syntax.

      • GREATEST

        public static final SqlFunction GREATEST
        The "GREATEST(value, value)" function.
      • LEAST

        public static final SqlFunction LEAST
        The "LEAST(value, value)" function.
      • TRANSLATE3

        public static final SqlFunction TRANSLATE3
        The TRANSLATE(string_expr, search_chars, replacement_chars) function returns string_expr with all occurrences of each character in search_chars replaced by its corresponding character in replacement_chars.

        It is not defined in the SQL standard, but occurs in Oracle and PostgreSQL.

      • JSON_DEPTH

        public static final SqlFunction JSON_DEPTH
      • JSON_LENGTH

        public static final SqlFunction JSON_LENGTH
      • JSON_PRETTY

        public static final SqlFunction JSON_PRETTY
      • JSON_REMOVE

        public static final SqlFunction JSON_REMOVE
      • JSON_STORAGE_SIZE

        public static final SqlFunction JSON_STORAGE_SIZE
      • REGEXP_REPLACE

        public static final SqlFunction REGEXP_REPLACE
      • MONTHNAME

        public static final SqlFunction MONTHNAME
        The "MONTHNAME(datetime)" function; returns the name of the month, in the current locale, of a TIMESTAMP or DATE argument.
      • DAYNAME

        public static final SqlFunction DAYNAME
        The "DAYNAME(datetime)" function; returns the name of the day of the week, in the current locale, of a TIMESTAMP or DATE argument.
      • DIFFERENCE

        public static final SqlFunction DIFFERENCE
      • CONCAT_FUNCTION

        public static final SqlFunction CONCAT_FUNCTION
        The "CONCAT(arg, ...)" function that concatenates strings. For example, "CONCAT('a', 'bc', 'd')" returns "abcd".
      • FROM_BASE64

        public static final SqlFunction FROM_BASE64
      • TO_DATE

        public static final SqlFunction TO_DATE
        The "TO_DATE(string1, string2)" function; casts string1 to a DATE using the format specified in string2.
      • TO_TIMESTAMP

        public static final SqlFunction TO_TIMESTAMP
        The "TO_TIMESTAMP(string1, string2)" function; casts string1 to a TIMESTAMP using the format specified in string2.
      • INFIX_CAST

        public static final SqlOperator INFIX_CAST
        Infix "::" cast operator used by PostgreSQL, for example '100'::INTEGER.
    • Constructor Detail

      • SqlLibraryOperators

        private SqlLibraryOperators()