Use OPERATION
to call any EclipseLink operator.
Usage
EclipseLink supports many database functions using standard operator names that are translated to different databases. EclipseLink operators are supported on any database that has an equivalent function (or set of functions). Use the EclipseLink ExpressionOperator
class to define a custom operator or allow DatabasePlatform
to override an operator..
OPERATOR
is similar to FUNCTION
, but allows the function to be database independent, and you can call functions that require special syntax.
The supported EclipseLink operators include:
Abs
ToUpperCase
ToLowerCase
Chr
Concat
Coalesce
Case
HexToRaw
Initcap
Instring
Soundex
LeftPad
LeftTrim
RightPad
RightTrim
Substring
Translate
Ascii
Length
CharIndex
Cast
Extract
CharLength
Difference
Reverse
Replicate
Right
Locate
ToNumber
ToChar
AddMonths
DateToString
MonthsBetween
NextDay
RoundDate
AddDate
DateName
DatePart
DateDifference
TruncateDate
NewTime
Nvl
NewTime
Ceil
Cos
Cosh
Acos
Asin
Atan
Exp
Sqrt
Floor
Ln
Log
Mod
Power
Round
Sign
Sin
Sinh
Tan
Tanh
Trunc
Greatest
Least
Add
Subtract
Divide
Multiply
Atan2
Cot
Deref
Ref
RefToHex
Value
ExtractXml
ExtractValue
ExistsNode
GetStringVal
GetNumberVal
IsFragment
SDO_WITHIN_DISTANCE
SDO_RELATE
SDO_FILTER
SDO_NN
NullIf
Examples
Example 3-10 shows how to use this JPQL extension.
Example 3-10 Using OPERATOR EQL
SELECT e FROM Employee e WHERE OPERATOR('ExtractXml', e.resume, '@years-experience') > 10
See Also
For more information, see: