JPQL defines support for some methods within its syntax. The following are supported
for in-memory evaluation currently.
|
Java Type
|
Method
|
Description
|
|
|
CURRENT_DATE
|
Returns the current date
|
|
|
CURRENT_TIME
|
Returns the current time
|
|
|
CURRENT_TIMESTAMP
|
Returns the current timestamp
|
|
|
ABS(numericExpr)
|
Returns the absolute value of the passed arg
|
|
|
SQRT(numericExpr)
|
Returns the square root of the passed arg
|
|
|
MOD(numericExpr, numericExpr)
|
Returns the modulus of the passed arg
|
|
|
SIZE(collectionExpr)
|
Returns the modulus of the passed arg
|
|
|
UPPER(stringExpr)
|
Returns the passed string in UPPERCASE
|
|
|
LOWER(stringExpr)
|
Returns the passed string in lowercase
|
|
|
LENGTH(stringExpr)
|
Returns the length of the passed string
|
|
|
CONCAT(stringExpr, stringExpr [,stringExpr])
|
Returns a concatenation of the supplied strings
|
|
|
LOCATE(stringExpr, stringExpr [,numericExpr])
|
Returns the position of the second arg within the first arg
|
|
|
SUBSTRING(stringExpr, numericExpr [,numericExpr])
|
Returns the substring of the first arg
|
|
|
TRIM([trimChar] [FROM] stringExpr)
|
Returns a trimmed form of the string argument
|
Support for in-memory evaluation of query methods is provided via a
plugin-point so can be
extended easily.