[Bast-commits] r5776 - in DBIx-Class/0.08/trunk/lib/DBIx/Class:
CDBICompat Storage
robkinyon at dev.catalyst.perl.org
robkinyon at dev.catalyst.perl.org
Thu Mar 19 20:35:38 GMT 2009
Author: robkinyon
Date: 2009-03-19 20:35:37 +0000 (Thu, 19 Mar 2009)
New Revision: 5776
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/Retrieve.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
Log:
Moved some SQL parsing of ORDER BY from _select_args() to retrieve_from_sql() where it belongs
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/Retrieve.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/Retrieve.pm 2009-03-19 20:34:51 UTC (rev 5775)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/Retrieve.pm 2009-03-19 20:35:37 UTC (rev 5776)
@@ -54,6 +54,10 @@
push @rest, { rows => $1 };
}
+ if ( $cond =~ s/\bORDER\s+BY\s+(.*)$//i ) {
+ push @rest, { order_by => $1 };
+ }
+
return $class->search_literal($cond, @rest);
}
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm 2009-03-19 20:34:51 UTC (rev 5775)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm 2009-03-19 20:35:37 UTC (rev 5776)
@@ -1384,14 +1384,6 @@
my ($self, $ident, $select, $condition, $attrs) = @_;
my $order = $attrs->{order_by};
- if (ref $condition eq 'SCALAR') {
- my $unwrap = ${$condition};
- if ($unwrap =~ s/ORDER BY (.*)$//i) {
- $order = $1;
- $condition = \$unwrap;
- }
- }
-
my $for = delete $attrs->{for};
my $sql_maker = $self->sql_maker;
$sql_maker->{for} = $for;
More information about the Bast-commits
mailing list