Skip to content

Commit

Permalink
use proper bullet list in Dialect javadoc
Browse files Browse the repository at this point in the history
This is Javadoc, not a comment, so I should have
formatted it properly when I originally wrote this.
  • Loading branch information
gavinking authored and beikov committed Feb 4, 2021
1 parent 34cb6d5 commit 377ca5c
Showing 1 changed file with 95 additions and 67 deletions.
162 changes: 95 additions & 67 deletions hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java
Expand Up @@ -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
* <ul>
* <li> avg(arg) - aggregate function
* <li> count([distinct ]arg) - aggregate function
* <li> max(arg) - aggregate function
* <li> min(arg) - aggregate function
* <li> sum(arg) - aggregate function
* </ul>
*
* <ul>
* <li> coalesce(arg0, arg1, ...)
* <li> nullif(arg0, arg1)
* </ul>
*
* <ul>
* <li> lower(arg)
* <li> upper(arg)
* <li> length(arg)
* <li> concat(arg0, arg1, ...)
* <li> locate(pattern, string[, start])
* <li> substring(string, start[, length])
* <li> trim([[spec ][character ]from] string)
* </ul>
*
* <ul>
* <li> abs(arg)
* <li> mod(arg0, arg1)
* <li> sqrt(arg)
* </ul>
*
* <ul>
* <li> current date
* <li> current time
* <li> current timestamp
* </ul>
*
* Along with an additional set of functions defined by ANSI SQL:
*
* * any(arg) - aggregate function
* * every(arg) - aggregate function
* <ul>
* <li> any(arg) - aggregate function
* <li> every(arg) - aggregate function
* </ul>
*
* * cast(arg as Type)
* * extract(field from arg)
* <ul>
* <li> cast(arg as Type)
* <li> extract(field from arg)
* </ul>
*
* * ln(arg)
* * exp(arg)
* * power(arg0, arg1)
* * floor(arg)
* * ceiling(arg)
* <ul>
* <li> ln(arg)
* <li> exp(arg)
* <li> power(arg0, arg1)
* <li> floor(arg)
* <li> ceiling(arg)
* </ul>
*
* * position(pattern in string)
* * substring(string from start[ for length])
* * overlay(string placing replacement from start[ for length])
* <ul>
* <li> position(pattern in string)
* <li> substring(string from start[ for length])
* <li> overlay(string placing replacement from start[ for length])
* </ul>
*
* And the following functions for working with java.time types:
*
* * local date
* * local time
* * local datetime
* * offset datetime
* * instant
* <ul>
* <li> local date
* <li> local time
* <li> local datetime
* <li> offset datetime
* <li> instant
* </ul>
*
* 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)
* <ul>
* <li> left(string, length)
* <li> right(string, length)
* <li> replace(string, pattern, replacement)
* <li> pad(string with length spec[ character])
* </ul>
*
* <ul>
* <li> sign(arg)
* <li> sin(arg)
* <li> cos(arg)
* <li> tan(arg)
* <li> asin(arg)
* <li> acos(arg)
* <li> atan(arg)
* <li> atan2(arg0, arg1)
* <li> round(arg0, arg1)
* <li> least(arg0, arg1, ...)
* <li> greatest(arg0, arg1, ...)
* </ul>
*
* <ul>
* <li> format(datetime as pattern)
* <li> str(arg) - synonym of cast(a as String)
* <li> ifnull(arg0, arg1) - synonym of coalesce(a, b)
* </ul>
*
* 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)
* <ul>
* <li> second(arg) - synonym of extract(second from a)
* <li> minute(arg) - synonym of extract(minute from a)
* <li> hour(arg) - synonym of extract(hour from a)
* <li> day(arg) - synonym of extract(day from a)
* <li> month(arg) - synonym of extract(month from a)
* <li> year(arg) - synonym of extract(year from a)
* </ul>
*
*/
public void initializeFunctionRegistry(QueryEngine queryEngine) {
Expand Down

0 comments on commit 377ca5c

Please sign in to comment.