[Bast-commits] r3642 - in DBIx-Class/0.08/trunk: .
lib/DBIx/Class/Storage/DBI
matthewt at dev.catalyst.perl.org
matthewt at dev.catalyst.perl.org
Fri Aug 3 19:52:17 GMT 2007
Author: matthewt
Date: 2007-08-03 19:52:16 +0100 (Fri, 03 Aug 2007)
New Revision: 3642
Modified:
DBIx-Class/0.08/trunk/Changes
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm
Log:
optimisation in cursor
Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes 2007-08-01 13:50:04 UTC (rev 3641)
+++ DBIx-Class/0.08/trunk/Changes 2007-08-03 18:52:16 UTC (rev 3642)
@@ -1,4 +1,7 @@
Revision history for DBIx::Class
+
+ - optimisation in DBI::Cursor to check software_limit before falling
+ back to base Cursor->all
- fix bug with create_multi not inserting non-storage objects
(test and fix from davinchi)
- DBIx::Class::AccessorGroup made empty subclass of
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm 2007-08-01 13:50:04 UTC (rev 3641)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm 2007-08-03 18:52:16 UTC (rev 3642)
@@ -124,7 +124,10 @@
sub all {
my ($self) = @_;
- return $self->SUPER::all if $self->{attrs}{rows};
+ if ($self->{attrs}{software_limit}
+ && ($self->{attrs}{offset} || $self->{attrs}{rows})) {
+ return $self->SUPER::all;
+ }
$self->{storage}->dbh_do($self->can('_dbh_all'), $self);
}
More information about the Bast-commits
mailing list