public class AnsiSqlDialect extends Object implements Dialect
| 构造器和说明 |
|---|
AnsiSqlDialect() |
| 限定符和类型 | 方法和说明 |
|---|---|
DialectName |
dialectName()
方言名
|
Wrapper |
getWrapper() |
PreparedStatement |
psForCount(Connection conn,
Query query)
构建用于查询行数的PreparedStatement
|
PreparedStatement |
psForDelete(Connection conn,
Query query)
构建用于删除的PreparedStatement
|
PreparedStatement |
psForFind(Connection conn,
Query query)
构建用于获取多条记录的PreparedStatement
|
PreparedStatement |
psForInsert(Connection conn,
Entity entity)
构建用于插入的PreparedStatement
|
PreparedStatement |
psForInsertBatch(Connection conn,
Entity... entities)
构建用于批量插入的PreparedStatement
|
PreparedStatement |
psForPage(Connection conn,
Query query)
构建用于分页查询的PreparedStatement
|
PreparedStatement |
psForUpdate(Connection conn,
Entity entity,
Query query)
构建用于更新的PreparedStatement
|
void |
setWrapper(Wrapper wrapper)
设置包装器
|
protected SqlBuilder |
wrapPageSql(SqlBuilder find,
Page page)
根据不同数据库在查询SQL语句基础上包装其分页的语句
各自数据库通过重写此方法实现最小改动情况下修改分页语句 |
protected Wrapper wrapper
public Wrapper getWrapper()
getWrapper 在接口中 Dialectpublic void setWrapper(Wrapper wrapper)
DialectsetWrapper 在接口中 Dialectwrapper - 包装器public PreparedStatement psForInsert(Connection conn, Entity entity) throws SQLException
DialectpsForInsert 在接口中 Dialectconn - 数据库连接对象entity - 数据实体类(包含表名)SQLException - SQL执行异常public PreparedStatement psForInsertBatch(Connection conn, Entity... entities) throws SQLException
DialectpsForInsertBatch 在接口中 Dialectconn - 数据库连接对象entities - 数据实体,实体的结构必须全部一致,否则插入结果将不可预知SQLException - SQL执行异常public PreparedStatement psForDelete(Connection conn, Query query) throws SQLException
DialectpsForDelete 在接口中 Dialectconn - 数据库连接对象query - 查找条件(包含表名)SQLException - SQL执行异常public PreparedStatement psForUpdate(Connection conn, Entity entity, Query query) throws SQLException
DialectpsForUpdate 在接口中 Dialectconn - 数据库连接对象entity - 数据实体类(包含表名)query - 查找条件(包含表名)SQLException - SQL执行异常public PreparedStatement psForFind(Connection conn, Query query) throws SQLException
DialectpsForFind 在接口中 Dialectconn - 数据库连接对象query - 查询条件(包含表名)SQLException - SQL执行异常public PreparedStatement psForPage(Connection conn, Query query) throws SQLException
DialectpsForPage 在接口中 Dialectconn - 数据库连接对象query - 查询条件(包含表名)SQLException - SQL执行异常protected SqlBuilder wrapPageSql(SqlBuilder find, Page page)
find - 标准查询语句page - 分页对象public PreparedStatement psForCount(Connection conn, Query query) throws SQLException
DialectpsForCount 在接口中 Dialectconn - 数据库连接对象query - 查询条件(包含表名)SQLException - SQL执行异常public DialectName dialectName()
DialectdialectName 在接口中 DialectCopyright © 2019. All rights reserved.