# man > SQL::Statement::Term(3pm)

## NAME
    [SQL::Statement::Term](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3ATerm/markdown) - base class for all terms

## SYNOPSIS
      # create a term with an [SQL::Statement](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement/markdown) object as owner
      my $term = [SQL::Statement::Term](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3ATerm/markdown)->new( $owner );
      # access the value of that term
      $term->value( $eval );

## DESCRIPTION
    [SQL::Statement::Term](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3ATerm/markdown) is an abstract base class providing the interface for all terms.

## INHERITANCE
      [SQL::Statement::Term](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3ATerm/markdown)

## 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.

## NAME
    [SQL::Statement::ConstantTerm](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3AConstantTerm/markdown) - term for constant values

## SYNOPSIS
      # create a term with an [SQL::Statement](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement/markdown) object as owner
      my $term = [SQL::Statement::ConstantTerm](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3AConstantTerm/markdown)->new( $owner, 'foo' );
      # access the value of that term - returns 'foo'
      $term->value( $eval );

## DESCRIPTION
    [SQL::Statement::ConstantTerm](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3AConstantTerm/markdown) implements a term which will always return the same constant value.

## INHERITANCE
      [SQL::Statement::ConstantTerm](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3AConstantTerm/markdown)
      ISA [SQL::Statement::Term](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3ATerm/markdown)

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

  value
    Returns the specified constant.

## NAME
    [SQL::Statement::ColumnValue](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3AColumnValue/markdown) - term for column values

## SYNOPSIS
      # create a term with an [SQL::Statement](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement/markdown) object as owner
      my $term = [SQL::Statement::ColumnValue](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3AColumnValue/markdown)->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
    [SQL::Statement::ColumnValue](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3AColumnValue/markdown) implements a term which will return the specified column of the
    active row.

## INHERITANCE
      [SQL::Statement::ColumnValue](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3AColumnValue/markdown)
      ISA [SQL::Statement::Term](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3ATerm/markdown)

## 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.

## AUTHOR AND COPYRIGHT
    Copyright (c) 2009-2020 by Jens Rehsack: rehsackATcpan.org

    All rights reserved.

    You may distribute this module under the terms of either the GNU General Public License or the
    Artistic License, as specified in the Perl README file.

