SQL::Statement::Term - base class for all terms


SQL-Statement documentation  | view source Contained in the SQL-Statement distribution.

Index


NAME

Top

SQL::Statement::Term - base class for all terms

SYNOPSIS

Top

  # create a term with an SQL::Statement object as owner
  my $term = SQL::Statement::Term->new( $owner );
  # access the value of that term
  $term->value( $eval );

DESCRIPTION

Top

SQL::Statement::Term is an abstract base class providing the interface for all terms.

INHERITANCE

Top

  SQL::Statement::Term

METHODS

Top

new

Instantiates new term and stores a weak reference to the owner.

value

Abstract method which will return the value of the term. Must be overridden by derived classes.

DESTROY

Destroys the term and undefines the weak reference to the owner.

NAME

Top

SQL::Statement::ConstantTerm - term for constant values

SYNOPSIS

Top

  # create a term with an SQL::Statement object as owner
  my $term = SQL::Statement::ConstantTerm->new( $owner, 'foo' );
  # access the value of that term - returns 'foo'
  $term->value( $eval );

DESCRIPTION

Top

SQL::Statement::ConstantTerm implements a term which will always return the same constant value.

INHERITANCE

Top

  SQL::Statement::ConstantTerm
  ISA SQL::Statement::Term

METHODS

Top

new

Instantiates new term and stores the constant to deliver and a weak reference to the owner.

value

Returns the specified constant.

NAME

Top

SQL::Statement::ColumnValue - term for column values

SYNOPSIS

Top

  # create a term with an SQL::Statement object as owner
  my $term = SQL::Statement::ColumnValue->new( $owner, 'id' );
  # access the value of that term - returns the value of the column 'id'
  # of the currently active row in $eval
  $term->value( $eval );

DESCRIPTION

Top

SQL::Statement::ColumnValue implements a term which will return the specified column of the active row.

INHERITANCE

Top

  SQL::Statement::ColumnValue
  ISA SQL::Statement::Term

METHODS

Top

new

Instantiates new term and stores the column name to deliver and a weak reference to the owner.

value

Returns the specified column value.

AUTHOR AND COPYRIGHT

Top


SQL-Statement documentation  | view source Contained in the SQL-Statement distribution.