[Bast-commits] r6003 - SQL-Abstract/1.x/branches/and_or/lib/SQL
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue Apr 28 21:01:46 GMT 2009
Author: ribasushi
Date: 2009-04-28 22:01:46 +0100 (Tue, 28 Apr 2009)
New Revision: 6003
Modified:
SQL-Abstract/1.x/branches/and_or/lib/SQL/Abstract.pm
Log:
Revert r5976, trying something better
Modified: SQL-Abstract/1.x/branches/and_or/lib/SQL/Abstract.pm
===================================================================
--- SQL-Abstract/1.x/branches/and_or/lib/SQL/Abstract.pm 2009-04-28 20:20:42 UTC (rev 6002)
+++ SQL-Abstract/1.x/branches/and_or/lib/SQL/Abstract.pm 2009-04-28 21:01:46 UTC (rev 6003)
@@ -360,13 +360,11 @@
sub _where_ARRAYREF {
- my ($self, $where, $_logic) = @_;
+ my ($self, $where, $logic) = @_;
- my $logic = uc($_logic || $self->{logic});
+ $logic = uc($logic || $self->{logic});
$logic eq 'AND' or $logic eq 'OR' or puke "unknown logic: $logic";
- my $orig_logic = $self->{logic};
-
my @clauses = @$where;
my (@sql_clauses, @all_bind);
@@ -401,7 +399,6 @@
push @all_bind, @bind;
}
}
- $logic = $self->{logic} if $orig_logic ne $self->{logic} and !$_logic;
return $self->_join_sql_clauses($logic, \@sql_clauses, \@all_bind);
}
@@ -587,11 +584,6 @@
},
FALLBACK => sub { # CASE: col => {op => $scalar}
- if ($val =~ /^ - ( AND|OR ) $/ix) {
- $self->{logic} = uc $1;
- delete $v->{$op};
- return '', ();
- }
$sql = join ' ', $self->_convert($self->_quote($k)),
$self->_sqlcase($op),
$self->_convert('?');
More information about the Bast-commits
mailing list