In passing, change warnings_exist to warnings_like, to catch
unexpected warnings.
return $self->sqlfalse unless @$v;
$self->_debug("ARRAY($k) means distribute over elements");
my $logic = lc(
- $v->[0] =~ /^-(and|or)$/i
+ ($v->[0]||'') =~ /^-(and|or)$/i
? (shift(@{$v = [ @$v ]}), $1)
: lc($self->{logic} || 'OR')
);
{
where => {
+ requestor => [undef, ''],
+ },
+ stmt => " WHERE ( requestor IS NULL OR requestor = ? )",
+ bind => [''],
+ },
+
+ {
+ where => {
priority => [ {'>', 3}, {'<', 1} ],
requestor => { '!=', undef },
},
my $sql = SQL::Abstract->new;
my ($stmt, @bind);
lives_ok {
- warnings_exist {
+ warnings_like {
($stmt, @bind) = $sql->where($case->{where}, $case->{order});
} $case->{warns} || [];
};