X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02where.t;h=0790a64349aa1e78e33039eb271ca8dd553a819a;hb=63cb75ace0d452c22298e23916c3e1644902a960;hp=6fe91f8a7c474f137324263c06d3f33f71605d29;hpb=bd6a65cac4599702fc4a717772934ff28421c6be;p=scpubgit%2FQ-Branch.git diff --git a/t/02where.t b/t/02where.t index 6fe91f8..0790a64 100644 --- a/t/02where.t +++ b/t/02where.t @@ -309,6 +309,30 @@ my @handle_tests = ( bind => [1, 2], }, +# Op against internal function + { + where => { bool1 => { '=' => { -not_bool => 'bool2' } } }, + stmt => " WHERE ( bool1 = NOT(bool2) )", + bind => [], + }, + { + where => { -not_bool => { -not_bool => { -not_bool => 'bool2' } } }, + stmt => " WHERE ( NOT ( NOT ( NOT bool2 ) ) )", + bind => [], + }, + +# Op against random functions (these two are oracle-specific) + { + where => { timestamp => { '!=' => { -trunk => \'sysdate' } } }, + stmt => " WHERE ( timestamp != TRUNC(sysdate) )", + bind => [], + }, + { + where => { timestamp => { '>=' => { -TO_DATE => '2009-12-21 00:00:00' } } }, + stmt => " WHERE ( timestamp >= TO_DATE(?) )", + bind => ['2009-12-21 00:00:00'], + }, + ); plan tests => ( @handle_tests * 2 ) + 1;