... | ... |
@@ -1581,10 +1581,8 @@ sub _where_clause_and_param { |
1581 | 1581 |
} |
1582 | 1582 |
elsif (ref $where) { |
1583 | 1583 |
|
1584 |
- # Hash |
|
1585 | 1584 |
if (ref $where eq 'HASH') { |
1586 | 1585 |
my $clause = ['and']; |
1587 |
- my $q = $self->_quote; |
|
1588 | 1586 |
for my $column (keys %$where) { |
1589 | 1587 |
my $table; |
1590 | 1588 |
my $c; |
... | ... |
@@ -1598,22 +1596,13 @@ sub _where_clause_and_param { |
1598 | 1596 |
my $column_quote = $self->q($c); |
1599 | 1597 |
$column_quote = $table_quote . '.' . $column_quote |
1600 | 1598 |
if defined $table_quote; |
1601 |
- push @$clause, "$column_quote = :$column" for keys %$where; |
|
1599 |
+ push @$clause, "$column_quote = :$column"; |
|
1602 | 1600 |
} |
1603 | 1601 |
$obj = $self->where(clause => $clause, param => $where); |
1604 | 1602 |
} |
1605 |
- |
|
1606 |
- # DBIx::Custom::Where object |
|
1607 |
- elsif (ref $where eq 'DBIx::Custom::Where') { |
|
1608 |
- $obj = $where; |
|
1609 |
- } |
|
1610 |
- |
|
1611 |
- # Array |
|
1603 |
+ elsif (ref $where eq 'DBIx::Custom::Where') { $obj = $where } |
|
1612 | 1604 |
elsif (ref $where eq 'ARRAY') { |
1613 |
- $obj = $self->where( |
|
1614 |
- clause => $where->[0], |
|
1615 |
- param => $where->[1] |
|
1616 |
- ); |
|
1605 |
+ $obj = $self->where(clause => $where->[0], param => $where->[1]); |
|
1617 | 1606 |
} |
1618 | 1607 |
|
1619 | 1608 |
# Check where argument |
... | ... |
@@ -1622,7 +1611,6 @@ sub _where_clause_and_param { |
1622 | 1611 |
. _subname |
1623 | 1612 |
unless ref $obj eq 'DBIx::Custom::Where'; |
1624 | 1613 |
|
1625 |
- |
|
1626 | 1614 |
$w->{param} = keys %$where_param |
1627 | 1615 |
? $self->merge_param($where_param, $obj->param) |
1628 | 1616 |
: $obj->param; |