[Dbix-class] NOT operator for SQLA

Peter Rabbitson rabbit+dbic at rabbit.us
Thu Jul 30 12:19:32 GMT 2009


Ivan Fomichev wrote:
> Hello,
> 
> Is there a conceptual obstacle to introduce NOT operator, that accepts
> hashref as an argument, like this:
> 
>   my ($where, @bind) = $sql->where(
>       {
>           -not => {
>               id => {
>                   '>' => 5,
>                   '<' => 10,
>               }
>           }
>       }
>   );
>   is_deeply(
>       [$where, @bind],
>       [' WHERE ( NOT ( ( id < ? AND id > ? ) ) )', 10, 5],
>       '-not');
> 
> 

nigel started some work on that, but something unexpected cropped up.
Ask him on irc what the deal with the branch is (or let us know if it
is ready for prime time as-is):

http://dev.catalyst.perl.org/svnweb/bast/log/SQL-Abstract/1.x/branches/bool_operator/



More information about the DBIx-Class mailing list