@Override
    public SQLQuery<T> clone(Connection conn) {
        SQLQuery<T> q = new SQLQuery<T>(conn, getConfiguration(), getMetadata().clone());
        q.clone(this);
        return q;
    }
Create a new SQLQuery instance

@param connProvider Connection to use
@param configuration configuration
@param metadata metadata
querydsl-sql/src/main/java/com/querydsl/sql/SQLQuery.java