Subject: | AND method like where |
I'd like to see an "and" method added like this.
sub and {
my ($self, $where, $order) = @_;
my ($sql, @bind) = $self->_recurse_where($where);
$sql = $sql ? $self->_sqlcase(' and ') . "( $sql )" : '';
if ($order) {
$sql .= $self->_order_by($order);
}
return wantarray ? ($sql, @bind) : $sql;
}
This way I do not have to put my table joins into the where caluse.