public int del(Connection conn, Entity where) throws SQLException {
		checkConn(conn);
		if(CollectionUtil.isEmpty(where)){
			//不允许做全表删除
			throw new SQLException("Empty entity provided!");
		}
		
		final Query query = new Query(SqlUtil.buildConditions(where), where.getTableName());
		PreparedStatement ps = null;
		try {
			ps = dialect.psForDelete(conn, query);
			return ps.executeUpdate();
		} catch (SQLException e) {
			throw e;
		} finally {
			DbUtil.close(ps);
		}
	}
public int del ( Connection conn , Entity where ) throws SQLException { checkConn ( conn ) ; if ( CollectionUtil . isEmpty ( where ) ) { throw new SQLException ( "Empty entity provided!" ) ; } final Query query = new Query ( SqlUtil . buildConditions ( where ) , where . getTableName ( ) ) ; PreparedStatement ps = null ; try { ps = dialect . psForDelete ( conn , query ) ; return ps . executeUpdate ( ) ; } catch ( SQLException e ) { throw e ; } finally { DbUtil . close ( ps ) ; } }
删除数据<br>
此方法不会关闭Connection
@param conn 数据库连接
@param where 条件
@return 影响行数
@throws SQLException SQL执行异常