-
-
21 Oct 2020 14:46:55 UTC
- Distribution: SQL-Statement
- Module version: 1.414
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (20)
- Testers (2489 / 4 / 0)
- Kwalitee
Bus factor: 1- 80.29% Coverage
- License: perl_5
- Perl: v5.8.0
- Activity
24 month- Tools
- Download (155.77KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Carp
- Clone
- Data::Dumper
- Module::Runtime
- Params::Util
- Scalar::Util
- Text::Balanced
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
SQL::Statement::TermFactory - Factory for SQL::Statement::Term instances
SYNOPSIS
my $termFactory = SQL::Statement::TermFactory->new($stmt); my $whereTerms = $termFactory->buildCondition( $stmt->{where_clause} ); my $col = $termFactory->buildCondition( $stmt->{col_obj}->{$name}->{content} );
DESCRIPTION
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.
AUTHOR AND COPYRIGHT
Copyright (c) 2001,2005 by Jeff Zucker: jzuckerATcpan.org 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.
Module Install Instructions
To install SQL::Statement, copy and paste the appropriate command in to your terminal.
cpanm SQL::Statement
perl -MCPAN -e shell install SQL::Statement
For more information on module installation, please visit the detailed CPAN module installation guide.