[Dbix-class] RFC: ResultSet->copy

Rob Kinyon rob.kinyon at gmail.com
Wed Mar 2 21:41:22 GMT 2011


All -

    Row->copy( $overrides={} ) exists and inserts a new row into the
database that's identical to the old row (modulo any is_auto_increment
rows), allowing for any overrides.

    I would like to propose a similar function for resultsets. It
would take the same parameters and would do an INSERT INTO <table> (
<columns> ) SELECT <values> FROM <Resultset query>. The columns and
values would be from the resultset's resultsource. The query would be
what the SELECT statement would be if you did $rs->all.

    Objections? Thoughts? Comments?

-- 
Thanks,
Rob Kinyon



More information about the DBIx-Class mailing list