diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java index c1f7ba18f4f4..f967c14d9c4c 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java @@ -270,89 +270,117 @@ static Size binaryToDecimalPrecision(int code, Size size) { * These required functions include the functions defined by the JPA * query language specification: * - * * avg(arg) - aggregate function - * * count([distinct ]arg) - aggregate function - * * max(arg) - aggregate function - * * min(arg) - aggregate function - * * sum(arg) - aggregate function - * - * * coalesce(arg0, arg1, ...) - * * nullif(arg0, arg1) - * - * * lower(arg) - * * upper(arg) - * * length(arg) - * * concat(arg0, arg1, ...) - * * locate(pattern, string[, start]) - * * substring(string, start[, length]) - * * trim([[spec ][character ]from] string) - * - * * abs(arg) - * * mod(arg0, arg1) - * * sqrt(arg) - * - * * current date - * * current time - * * current timestamp + * + * + * + * + * + * + * + * + * * * Along with an additional set of functions defined by ANSI SQL: * - * * any(arg) - aggregate function - * * every(arg) - aggregate function + * * - * * cast(arg as Type) - * * extract(field from arg) + * * - * * ln(arg) - * * exp(arg) - * * power(arg0, arg1) - * * floor(arg) - * * ceiling(arg) + * * - * * position(pattern in string) - * * substring(string from start[ for length]) - * * overlay(string placing replacement from start[ for length]) + * * * And the following functions for working with java.time types: * - * * local date - * * local time - * * local datetime - * * offset datetime - * * instant + * * * And a number of additional "standard" functions: * - * * left(string, length) - * * right(string, length) - * * replace(string, pattern, replacement) - * * pad(string with length spec[ character]) - * - * * sign(arg) - * * sin(arg) - * * cos(arg) - * * tan(arg) - * * asin(arg) - * * acos(arg) - * * atan(arg) - * * atan2(arg0, arg1) - * * round(arg0, arg1) - * * least(arg0, arg1, ...) - * * greatest(arg0, arg1, ...) - * - * * format(datetime as pattern) - * * str(arg) - synonym of cast(a as String) - * * ifnull(arg0, arg1) - synonym of coalesce(a, b) + * + * + * + * + * * * Finally, the following functions are defined as abbreviations * for extract(), and desugared by the parser: * - * * second(arg) - synonym of extract(second from a) - * * minute(arg) - synonym of extract(minute from a) - * * hour(arg) - synonym of extract(hour from a) - * * day(arg) - synonym of extract(day from a) - * * month(arg) - synonym of extract(month from a) - * * year(arg) - synonym of extract(year from a) + * * */ public void initializeFunctionRegistry(QueryEngine queryEngine) {