From: Nigel Metheringham Date: Wed, 2 May 2007 14:58:45 +0000 (+0000) Subject: Documented use of cursor->next for fast but uncomfortable data fetches X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=685dad647365aacb8c3f8ed994d929e724ebb2e7;p=dbsrgits%2FDBIx-Class-Historic.git Documented use of cursor->next for fast but uncomfortable data fetches --- diff --git a/lib/DBIx/Class/Cursor.pm b/lib/DBIx/Class/Cursor.pm index 3c55b69..ded8b56 100644 --- a/lib/DBIx/Class/Cursor.pm +++ b/lib/DBIx/Class/Cursor.pm @@ -38,7 +38,8 @@ sub new { =head2 next -Virtual method. Advances the cursor to the next row. +Virtual method. Advances the cursor to the next row. Returns an array of +column values (the result of L method). =cut diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 6d5b67d..b3dff9c 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -1145,6 +1145,22 @@ C: } } +=head2 Get raw data for blindingly fast results + +If the C solution above is not fast enough for you, you +can use a DBIx::Class to return values exactly as they come out of the +data base with none of the convenience methods wrapped round them. + +This is used like so:- + + my $cursor = $rs->cursor + while (my @vals = $cursor->next) { + # use $val[0..n] here + } + +You will need to map the array offsets to particular columns (you can +use the I