| DBIx-SQLEngine documentation | Contained in the DBIx-SQLEngine distribution. |
DBIx::SQLEngine::Criteria::Not - Negating A Single Criteria
my $crit = DBIx::SQLEngine::Criteria::Not->new( $crit );
DBIx::SQLEngine::Criteria::Not logicaly inverts a single given criteria by wrapping it in a NOT criteria.
(Contributed by Christian Glahn at Innsbruck University.)
Constructor.
See DBIx::SQLEngine::Criteria and DBIx::SQLEngine::Criteria::Comparison for more information on using these objects.
See DBIx::SQLEngine for the overall interface and developer documentation.
See DBIx::SQLEngine::Docs::ReadMe for general information about this distribution, including installation and license information.
| DBIx-SQLEngine documentation | Contained in the DBIx-SQLEngine distribution. |
package DBIx::SQLEngine::Criteria::Not; @ISA = 'DBIx::SQLEngine::Criteria'; use strict; use Carp; sub new { my $package = shift; ( @_ < 2 ) or croak("The Not criteria only accepts one argument"); bless [ shift ], $package; } sub sql_where { my $self = shift; my ($clause, @params) = $self->[0]->sql_where; return unless defined $clause and length $clause; return ( " NOT ( " . $clause . " ) ", @params ) } 1; __END__ #########################################################################