[Bast-commits] r5799 - SQL-Abstract/1.x/trunk/lib/SQL
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sun Mar 22 22:26:12 GMT 2009
Author: ribasushi
Date: 2009-03-22 22:26:12 +0000 (Sun, 22 Mar 2009)
New Revision: 5799
Modified:
SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
Log:
Preliminary fix by arcanez
Modified: SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
===================================================================
--- SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm 2009-03-22 22:24:07 UTC (rev 5798)
+++ SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm 2009-03-22 22:26:12 UTC (rev 5799)
@@ -367,17 +367,7 @@
my @clauses = @$where;
- # if the array starts with [-and|or => ...], recurse with that logic
- my $first = $clauses[0] || '';
- if ($first =~ /^-(and|or)/i) {
- $logic = $1;
- shift @clauses;
- return $self->_where_ARRAYREF(\@clauses, $logic);
- }
-
- #otherwise..
my (@sql_clauses, @all_bind);
-
# need to use while() so can shift() for pairs
while (my $el = shift @clauses) {
@@ -518,8 +508,9 @@
my @distributed = map { {$k => $_} } @v;
unshift @distributed, $op if $op;
+ my $logic = $op ? substr($op, 1) : '';
- return $self->_recurse_where(\@distributed);
+ return $self->_recurse_where(\@distributed, $logic);
}
else {
# LDNOTE : not sure of this one. What does "distribute over nothing" mean?
More information about the Bast-commits
mailing list