[Dbix-class] NOT operator for SQLA

Alexander Hartmaier alexander.hartmaier at t-systems.at
Thu Jul 30 07:51:44 GMT 2009


Am Donnerstag, den 30.07.2009, 08:16 +0200 schrieb Ivan Fomichev:
> 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');
>
>
> Regards,
> Ivan

Remember that DBIx::Class uses SQL::Abstract which has the -not_between
operator you can use for that.

--
BR Alex


*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*



More information about the DBIx-Class mailing list