SQL::Statement::Term(3pm)

SQL::Statement::Term3pm

Base class for all terms

Usage

  # 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 );
  # 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 );
  # 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 );

Overview

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

Inheritance

  SQL::Statement::Term

Methods

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.

Overview

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

Inheritance

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

Methods

new

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

value

Returns the specified constant.

Overview

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

Inheritance

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

Methods

new

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

value

Returns the specified column value.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 5 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11–13

From libsql-statement-perl 1.414-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.