The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DBIx::SQLEngine::Criteria::Comparison - Superclass for comparisons

SYNOPSIS

  my $crit = DBIx::SQLEngine::Criteria::ComparisonSubclass->new( $key, $value );

DESCRIPTION

DBIx::SQLEngine::Criteria::Comparison objects provide a structured representation of certain simple kinds of SQL criteria clauses, those of the form column_or_expression comparison_operator comparison_value.

Each Criteria::Comparison object is implemented in the form of blessed arrayref, with two items in the array. The first is the column name (or SQL expression) to be compared against, and the second is the comparison value. The type of comparison operator to use is indicated by which subclass of Criteria::Comparison the object is blessed into.

The comparison value is assumed by default to be a literal string or numeric value, and uses parameter substitution to avoid having to deal with quoting. If you actually want to compare against another column or expression, pass a reference to the column name or expression string. For example, to select records where first_name = last_name, you could use:

  DBIx::SQLEngine::Criteria::StringEquality->('first_name', \'last_name');

REFERENCE

Constructor

new ( $key, $value ) : $Comparison

Constructor.

Content Access

expr () : $fieldname
expr ( $fieldname )
compv () : $comparsion_value
compv ( $comparsion_value )

Accessor

VERSION

2001-06-28 Simon: Moved to DBIx::O2:: namespace. Switched to Class::MakeMethods. Renamed from SimpleSQL to Comparison.

1999-10-13 Chaos: Added NumericInequality criterion.

1999-10-05 Chaos: Fixed StringInequality criterion.

1999-01-31 Simon: Removed Data::Collection dependancy; now handled by Data::DRef.

1998-09-18 Simon: Updated to use MethodMaker::Compatibility instead of NamedFactory.

1998-03-19 Simon: Switched to new table->quote_for_column method.

1998-03-17 Simon: Split DBO::Criteria subclasses into new .pm files.

AUTHORS

Developed by Evolution Online Systems:

  M. Simon Cavalletto, simonm@evolution.com

LICENSE

This module is free software. It may be used, redistributed and/or modified under the same terms as Perl.

Copyright (c) 1996, 1997, 1999, 2000, 2001 Evolution Online Systems, Inc.