[Bast-commits] r6419 -
DBIx-Class/0.08/branches/top_limit_altfix/lib/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Mon May 25 15:45:34 GMT 2009
Author: ribasushi
Date: 2009-05-25 15:45:33 +0000 (Mon, 25 May 2009)
New Revision: 6419
Modified:
DBIx-Class/0.08/branches/top_limit_altfix/lib/DBIx/Class/ResultSet.pm
Log:
Too much logic for no benefit - always populate _virtual_order_by
Modified: DBIx-Class/0.08/branches/top_limit_altfix/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/branches/top_limit_altfix/lib/DBIx/Class/ResultSet.pm 2009-05-25 14:53:13 UTC (rev 6418)
+++ DBIx-Class/0.08/branches/top_limit_altfix/lib/DBIx/Class/ResultSet.pm 2009-05-25 15:45:33 UTC (rev 6419)
@@ -746,26 +746,10 @@
#
# This is a horrble hack, but seems like the best we can do at this point
# Some limit emulations (Top) require an ordered resultset in order to
-# function at all. So supply a PK order if such a condition is detected
+# function at all. So supply a PK order to be used if necessary
sub _gen_virtual_order {
- my $self = shift;
- my $attrs = $self->_resolved_attrs_copy;
-
- if ($attrs->{rows} or $attrs->{offset} ) {
-
-# This check requires ensure_connected, so probably cheaper to just calculate all the time
-
-# my $sm = $self->result_source->storage->_sql_maker;
-#
-# if ($sm->_default_limit_syntax eq 'Top' and not @{$sm->_resolve_order ($attrs->{order_by}) }) {
-
- return [ $self->result_source->primary_columns ];
-
-# }
- }
-
- return undef;
+ return [ shift->result_source->primary_columns ];
}
# _is_unique_query
More information about the Bast-commits
mailing list