java.lang.Object | |
↳ | org.hibernate.dialect.function.DerbyConcatFunction |
A specialized concat() function definition in which:
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The return type of the function.
Here we always return
STRING . | |||||||||||
Does this function have any arguments?
Here we always return true
| |||||||||||
If there are no arguments, are parentheses required?
Here we always return true
| |||||||||||
Render the function call as SQL fragment.
Here's the meat..
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.hibernate.dialect.function.SQLFunction
|
The return type of the function. May be either a concrete type which is preset, or variable depending upon the type of the first function argument.
Note, the 'firstArgumentType' parameter should match the one passed intorender(Type, List, SessionFactoryImplementor)
Here we always return STRING
.
argumentType | The type of the first argument |
---|---|
mapping | The mapping source. |
QueryException |
---|
Does this function have any arguments?
Here we always return trueIf there are no arguments, are parentheses required?
Here we always return trueRender the function call as SQL fragment.
Note, the 'firstArgumentType' parameter should match the one passed intogetReturnType(Type, Mapping)
Here's the meat.. The whole reason we have a separate impl for this for Derby is to re-define
this method. The logic here says that if not all the incoming args are dynamic parameters
(i.e. ?) then we simply use the Derby concat operator (||) on the unchanged
arg elements. However, if all the args are dynamic parameters, then we need to wrap the individual
arg elements in cast function calls, use the concatenation operator on the cast
returns, and then wrap that whole thing in a call to the Derby varchar function.
argumentType | The type of the first argument |
---|---|
args | The function arguments |
factory | The SessionFactory |
QueryException |
---|