=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<DBI/fetchrow_array> method).
=cut
Wasn't that easy?
+=head2 Get raw data for blindingly fast results
+
+If the C<inflate_result> 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<select> attribute of C<search()> to force ordering).
+
=head2 Want to know if find_or_create found or created a row?
Just use C<find_or_new> instead, then check C<in_storage>:
%$source = %{ $source->new( { %$source, source_name => $moniker }) };
- $self->source_registrations->{$moniker} = $source;
+ my %reg = %{$self->source_registrations};
+ $reg{$moniker} = $source;
+ $self->source_registrations(\%reg);
$source->schema($self);
weaken($source->{schema}) if ref($self);
if ($source->result_class) {
- $self->class_mappings->{$source->result_class} = $moniker;
+ my %map = %{$self->class_mappings};
+ $map{$source->result_class} = $moniker;
+ $self->class_mappings(\%map);
}
}
=back
-Advances the cursor to the next row and returns an arrayref of column values.
+Advances the cursor to the next row and returns an array of column
+values (the result of L<DBI/fetchrow_array> method).
=cut