{
where => {
+ requestor => [undef, ''],
+ },
+ stmt => " WHERE ( requestor IS NULL OR requestor = ? )",
+ bind => [''],
+ },
+
+ {
+ where => {
priority => [ {'>', 3}, {'<', 1} ],
requestor => { '!=', undef },
},
# Op against random functions (these two are oracle-specific)
{
where => { timestamp => { '!=' => { -trunc => { -year => \'sysdate' } } } },
- stmt => " WHERE ( timestamp != TRUNC (YEAR sysdate) )",
+ stmt => " WHERE ( timestamp != TRUNC(YEAR(sysdate)) )",
bind => [],
},
{
where => { timestamp => { '>=' => { -to_date => '2009-12-21 00:00:00' } } },
- stmt => " WHERE ( timestamp >= TO_DATE ? )",
+ stmt => " WHERE ( timestamp >= TO_DATE(?) )",
bind => ['2009-12-21 00:00:00'],
},
my $sql = SQL::Abstract->new;
my ($stmt, @bind);
lives_ok {
- warnings_exist {
+ warnings_like {
($stmt, @bind) = $sql->where($case->{where}, $case->{order});
} $case->{warns} || [];
};