org.hibernate.dialect.function
Class SQLFunctionTemplate
java.lang.Object org.hibernate.dialect.function.SQLFunctionTemplate
-
All Implemented Interfaces:
- SQLFunction
public class SQLFunctionTemplateextends Object implements SQLFunction
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).
-
Version:
- $Revision: 6608 $ Author:
- Alexey Loubyansky