public interface SQLFunction
Provides support routines常规的for the HQL functions as used in the various不同的SQL Dialects方言Provides an interface for supporting various HQL functions that are translated翻译to SQL. The Dialect and its sub-classes use this interface to provide details required需要for processing处理of the function.
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 functionconcat(?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).
SQL方言与HQL函数转换
本文介绍了一个公共接口SQLFunction,用于支持不同SQL方言下的HQL函数转换。通过SQLFunctionTemplate类,定义了可以在不同SQL方言中拥有不同表现形式的HQL函数,例如concat函数在不同的数据库中有不同的实现方式。
1551

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



