Interface Dialect
- All Known Implementing Classes:
BaseDialect, DB2Dialect, DMDialect, H2Dialect, HSQLDialect, MariaDBDialect, MySQLDialect, OracleDialect, PostgreSQLDialect, SQLiteDialect, SQLServerDialect
public interface Dialect
方言
- Author:
- Maning
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object[]processTemplateParams(Template template, Object[] params) 模板参数处理,个别模板在个别数据库可能存在参数翻转或改变等,使用此方法进行处理标识符转义default voidsetJsonValue(PreparedStatement ps, int parameterIndex, String jsonValue, Configuration configuration) 设置json值时实现default String获取模板,可重写将SQL片段翻译为sql将语句翻译为sqldefault TranslationtranslateCustom(Segment segment) 转译自定义SQL,会在转译最后执行translatePaging(Integer limit, Integer offset) 转译分页default JDBCTypeps.setNull时使用的类型default boolean是否使用unicode字符集, 影响使用ResultSet.getNString(int)还是ResultSet.getString(int)等
-
Method Details
-
processTemplateParams
-
quote
-
setJsonValue
default void setJsonValue(PreparedStatement ps, int parameterIndex, String jsonValue, Configuration configuration) throws SQLException 设置json值时实现- Parameters:
ps- psparameterIndex- 参数下标jsonValue- json值configuration- 配置- Throws:
SQLException- sql异常
-
template
-
translate
将语句翻译为sql- Parameters:
statement- 语句,不能为null- Returns:
- 翻译结果,不允许返回null
-
translate
将SQL片段翻译为sql- Parameters:
segment- SQL片段,不能为null- Returns:
- 翻译结果,不允许返回null
-
translateCustom
转译自定义SQL,会在转译最后执行- Parameters:
segment- SQL片段,不能为null- Returns:
- 翻译结果,不允许返回null
-
translatePaging
转译分页- Parameters:
limit- 限制条数offset- 跳过条数- Returns:
- 分页语法
-
typeForSetNull
-
useNational
default boolean useNational()是否使用unicode字符集, 影响使用ResultSet.getNString(int)还是ResultSet.getString(int)等- Returns:
- 是否使用unicode字符集
-