[Bast-commits] r6460 - SQL-Abstract/1.x/trunk/lib/SQL
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sat May 30 08:10:40 GMT 2009
Author: ribasushi
Date: 2009-05-30 08:10:38 +0000 (Sat, 30 May 2009)
New Revision: 6460
Modified:
SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
Log:
Do not join hash order conditions early
Modified: SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
===================================================================
--- SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm 2009-05-30 07:53:14 UTC (rev 6459)
+++ SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm 2009-05-30 08:10:38 UTC (rev 6460)
@@ -861,26 +861,25 @@
my $direction = $1;
- my (@sql, @bind);
+ my @ret;
for my $c ($self->_order_by_chunks ($val)) {
+ my ($sql, @bind);
-
-
$self->_SWITCH_refkind ($c, {
SCALAR => sub {
- push @sql, $c
+ $sql = $c;
},
ARRAYREF => sub {
- my ($s, @b) = @$c;
- push @sql, $s;
- push @bind, @b;
+ ($sql, @bind) = @$c;
},
});
- }
- my $sql = join ', ', map { $_ . ' ' . $self->_sqlcase($direction) } @sql;
+ $sql = $sql . ' ' . $self->_sqlcase($direction);
- return [$sql, @bind];
+ push @ret, [ $sql, @bind];
+ }
+
+ return @ret;
},
});
}
More information about the Bast-commits
mailing list