public int insert(Connection conn, Entity record) throws SQLException {
		checkConn(conn);
		if(CollectionUtil.isEmpty(record)){
			throw new SQLException("Empty entity provided!");
		}
		PreparedStatement ps = null;
		try {
			ps = dialect.psForInsert(conn, record);
			return ps.executeUpdate();
		} catch (SQLException e) {
			throw e;
		} finally {
			DbUtil.close(ps);
		}
	}
public int insert ( Connection conn , Entity record ) throws SQLException { checkConn ( conn ) ; if ( CollectionUtil . isEmpty ( record ) ) { throw new SQLException ( "Empty entity provided!" ) ; } PreparedStatement ps = null ; try { ps = dialect . psForInsert ( conn , record ) ; return ps . executeUpdate ( ) ; } catch ( SQLException e ) { throw e ; } finally { DbUtil . close ( ps ) ; } }
插入数据<br>
此方法不会关闭Connection
@param conn 数据库连接
@param record 记录
@return 插入行数
@throws SQLException SQL执行异常