org.hibernate.dialect.function
Class SQLFunctionTemplate
java.lang.Object
org.hibernate.dialect.function.SQLFunctionTemplate
- SQLFunction
public class SQLFunctionTemplate
extends java.lang.Object
Represents HQL functions that can have different representations in different SQL dialects.
E.g. in HQL we can define function concat(?1, ?2)
to concatenate two strings
p1 and p2. Target SQL function will be dialect-specific, e.g. (?1 || ?2)
for
Oracle, concat(?1, ?2)
for MySql, (?1 + ?2)
for MS SQL.
Each dialect will define a template as a string (exactly like above) marking function
parameters with '?' followed by parameter's index (first index is 1).
SQLFunctionTemplate
public SQLFunctionTemplate(Type type,
String template)
SQLFunctionTemplate
public SQLFunctionTemplate(Type type,
String template,
boolean hasParenthesesIfNoArgs)
toString
public String toString()