[Dbix-class] [PATCH] answer for the populate() FAQ

Oliver Gorwits oliver.gorwits at oucs.ox.ac.uk
Mon Oct 22 16:17:41 GMT 2007


Hi,

Attached is a patch to answer the DBIx::Class::Manual::FAQ currently =

titled "insert many rows of data efficiently".

HTH,

regards,
oliver.
-- =

Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-------------- next part --------------
Index: trunk/lib/DBIx/Class/Manual/FAQ.pod
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk.orig/lib/DBIx/Class/Manual/FAQ.pod (revision 3828)
+++ trunk/lib/DBIx/Class/Manual/FAQ.pod (working copy)
@@ -340,8 +340,13 @@
 =

  ->add_columns({ id =3D> { sequence =3D> 'mysequence' } });
 =

-=3Ditem .. insert many rows of data efficiently?
+=3Ditem .. insert a collection of rows at the same time?
 =

+Take the hashref structures you would normally pass into
+L<create|DBIx::Class::ResultSet/"create"> and put
+them together into an arrayref. Pass this to L<DBIx::Class::ResultSet>'s =

+L<populate|DBIx::Class::ResultSet/"populate"> method.
+
 =3Ditem .. update a collection of rows at the same time?
 =

 Create a resultset using a search, to filter the rows of data you


More information about the DBIx-Class mailing list