com.xiaoleilu.hutool.db.dialect.impl
类 AnsiSqlDialect

java.lang.Object
  继承者 com.xiaoleilu.hutool.db.dialect.impl.AnsiSqlDialect
所有已实现的接口:
Dialect
直接已知子类:
MysqlDialect, OracleDialect

public class AnsiSqlDialect
extends Object
implements Dialect

ANSI SQL 方言

作者:
loolly

构造方法摘要
AnsiSqlDialect()
           
 
方法摘要
protected  StringBuilder buildSelectQuery(Collection<String> fields, Entity where, List<Object> paramValues)
          构件查询语句
 PreparedStatement psForCount(Connection conn, Entity where)
          构建用于查询行数的PreparedStatement
 PreparedStatement psForDelete(Connection conn, Entity entity)
          构建用于删除的PreparedStatement
 PreparedStatement psForFind(Connection conn, Collection<String> fields, Entity where)
          构建用于获取多条记录的PreparedStatement
 PreparedStatement psForInsert(Connection conn, Entity entity)
          构建用于插入的PreparedStatement
 PreparedStatement psForPage(Connection conn, Collection<String> fields, Entity where, int page, int numPerPage)
          构建用于分页查询的PreparedStatement
 PreparedStatement psForUpdate(Connection conn, Entity entity, Entity where)
          构建用于更新的PreparedStatement
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

AnsiSqlDialect

public AnsiSqlDialect()
方法详细信息

psForInsert

public PreparedStatement psForInsert(Connection conn,
                                     Entity entity)
                              throws SQLException
从接口 Dialect 复制的描述
构建用于插入的PreparedStatement

指定者:
接口 Dialect 中的 psForInsert
参数:
conn - 数据库连接对象
entity - 数据实体类(包含表名)
返回:
PreparedStatement
抛出:
SQLException

psForDelete

public PreparedStatement psForDelete(Connection conn,
                                     Entity entity)
                              throws SQLException
从接口 Dialect 复制的描述
构建用于删除的PreparedStatement

指定者:
接口 Dialect 中的 psForDelete
参数:
conn - 数据库连接对象
entity - 数据实体类(包含表名)
返回:
PreparedStatement
抛出:
SQLException

psForUpdate

public PreparedStatement psForUpdate(Connection conn,
                                     Entity entity,
                                     Entity where)
                              throws SQLException
从接口 Dialect 复制的描述
构建用于更新的PreparedStatement

指定者:
接口 Dialect 中的 psForUpdate
参数:
conn - 数据库连接对象
entity - 数据实体类(包含表名)
where - 条件数据类(包含表名)
返回:
PreparedStatement
抛出:
SQLException

psForFind

public PreparedStatement psForFind(Connection conn,
                                   Collection<String> fields,
                                   Entity where)
                            throws SQLException
从接口 Dialect 复制的描述
构建用于获取多条记录的PreparedStatement

指定者:
接口 Dialect 中的 psForFind
参数:
conn - 数据库连接对象
fields - 返回的字段列表,null则返回所有字段
where - 条件实体类(包含表名)
返回:
PreparedStatement
抛出:
SQLException

psForPage

public PreparedStatement psForPage(Connection conn,
                                   Collection<String> fields,
                                   Entity where,
                                   int page,
                                   int numPerPage)
                            throws SQLException
从接口 Dialect 复制的描述
构建用于分页查询的PreparedStatement

指定者:
接口 Dialect 中的 psForPage
参数:
conn - 数据库连接对象
fields - 返回的字段列表,null则返回所有字段
where - 条件实体类
page - 页码
numPerPage - 每页条目数
返回:
PreparedStatement
抛出:
SQLException

psForCount

public PreparedStatement psForCount(Connection conn,
                                    Entity where)
                             throws SQLException
从接口 Dialect 复制的描述
构建用于查询行数的PreparedStatement

指定者:
接口 Dialect 中的 psForCount
参数:
conn - 数据库连接对象
where - 条件实体类
返回:
PreparedStatement
抛出:
SQLException

buildSelectQuery

protected StringBuilder buildSelectQuery(Collection<String> fields,
                                         Entity where,
                                         List<Object> paramValues)
构件查询语句

参数:
fields - 返回的字段,空则返回所有字段
where - 条件
paramValues - 存放值的列表
返回:
查询语句


Copyright © 2014. All rights reserved.