protected <T> T executeWithKey(Class<T> type, @Nullable Path<T> path) {
        ResultSet rs = executeWithKeys();
        try {
            if (rs.next()) {
                return configuration.get(rs, path, 1, type);
            } else {
                return null;
            }
        } catch (SQLException e) {
            throw configuration.translate(e);
        } finally {
            close(rs);
        }
    }
Execute the clause and return the generated key cast to the given type.
If no rows were created, null is returned, otherwise the key of the first row is returned.

@param <T>
@param type type of key
@return generated key
querydsl-sql/src/main/java/com/querydsl/sql/dml/SQLMergeClause.java