public class H2Dialect extends AnsiSqlDialect
dbConfig, quoteWrapper| Modifier and Type | Method and Description |
|---|---|
String |
dialectName()
方言名
|
PreparedStatement |
psForUpsert(Connection conn,
Entity entity,
String... keys)
|
protected SqlBuilder |
wrapPageSql(SqlBuilder find,
Page page)
根据不同数据库在查询SQL语句基础上包装其分页的语句
各自数据库通过重写此方法实现最小改动情况下修改分页语句 |
getWrapper, psForDelete, psForFind, psForInsert, psForInsertBatch, psForPage, psForPage, psForUpdate, setWrapperclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpsForCount, psForCountpublic H2Dialect(DbConfig config)
config - 数据库配置public String dialectName()
DialectdialectName in interface DialectdialectName in class AnsiSqlDialectprotected SqlBuilder wrapPageSql(SqlBuilder find, Page page)
AnsiSqlDialectwrapPageSql in class AnsiSqlDialectfind - 标准查询语句page - 分页对象public PreparedStatement psForUpsert(Connection conn, Entity entity, String... keys)
DialectpsForUpsert in interface DialectpsForUpsert in class AnsiSqlDialectconn - 数据库连接对象entity - 数据实体类(包含表名)keys - 查找字段,某些数据库此字段必须,如H2,某些数据库无需此字段,如MySQL(通过主键)Copyright © 2025. All rights reserved.