SQL::Statement::TermFactory(3pm)

SQL::Statement::TermFactory3pm

Factory for sql::statement::term instances

Usage

  my $termFactory = SQL::Statement::TermFactory->new($stmt);
  my $whereTerms = $termFactory->buildCondition( $stmt->{where_clause} );
  my $col = $termFactory->buildCondition( $stmt->{col_obj}->{$name}->{content} );

Overview

This package implements a factory to create type and operation based terms. Those terms are used to access data from the table(s) - either when evaluating the where clause or returning column data.

The concept of a factory can be studied in Design Patterns by the Gang of Four. The concept of using polymorphism instead of conditions is suggested by Martin Fowler in his book Refactoring.

Methods

buildCondition

Builds a condition object from a given (part of a) where clause. This method calls itself recursively for predicates.

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.