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
SQL函数模板与不同数据库方言

本文探讨了SQL函数模板如何在不同的数据库方言中表示不同的函数实现,如使用Oracle、MySQL或MSSQL进行字符串连接操作的具体实例。
1839

被折叠的 条评论
为什么被折叠?



