![]() |
![]()
| ![]() |
![]()
NAMESQL::Statement::Function - abstract base class for all function executing termsSYNOPSIS# this class does not have a common constructor, because all derived classes # have their special requirements DESCRIPTIONSQL::Statement::Function is an abstract base class providing the interface for all function executing terms.INHERITANCESQL::Statement::Function ISA SQL::Statement::Term METHODSDESTROYDestroys the term and undefines the weak reference to the owner as well as the reference to the parameter list.NAMESQL::Statement::Function::UserFunc - implements executing a perl subroutineSYNOPSIS# create an user function term with an SQL::Statement object as owner, # specifying the function name, the subroutine name (full qualified) # and the parameters to the subroutine my $term = SQL::Statement::Function::UserFunc->new( $owner, $name, $sub, \@params ); # access the result of that operation $term->value( $eval ); DESCRIPTIONSQL::Statement::Function::UserFunc implements a term which returns the result of the specified subroutine.INHERITANCESQL::Statement::Function ISA SQL::Statement::Term METHODSnewInstantiates a new "SQL::Statement::Function::UserFunc" instance.valueInvokes the given subroutine with the values of the params and return it's result:my @params = map { $_->value($eval); } @{ $self->{PARAMS} }; return $subpkg->$subname( $self->{OWNER}, @params ); NAMESQL::Statement::Function::NumericEval - implements numeric evaluation of a termSYNOPSIS# create an user function term with an SQL::Statement object as owner, # specifying the expression to evaluate and the parameters to the subroutine my $term = SQL::Statement::NumericEval->new( $owner, $expr, \@params ); # access the result of that operation $term->value( $eval ); DESCRIPTIONSQL::Statement::Function::NumericEval implements the numeric evaluation of a term. All parameters are expected to be numeric.INHERITANCESQL::Statement::Function::NumericEval ISA SQL::Statement::Function ISA SQL::Statement::Term METHODSnewInstantiates a new "SQL::Statement::Function::NumericEval" instance. Takes $owner, $expr and \@params as arguments (in specified order).valueReturns the result of the evaluated expression.NAMESQL::Statement::Function::Trim - implements the built-in trim function supportSYNOPSIS# create an trim function term with an SQL::Statement object as owner, # specifying the spec, char and the parameters to the subroutine my $term = SQL::Statement::Trim->new( $owner, $spec, $char, \@params ); # access the result of that operation $term->value( $eval ); DESCRIPTIONSQL::Statement::Function::Trim implements string trimming.INHERITANCESQL::Statement::Function::Trim ISA SQL::Statement::Function ISA SQL::Statement::Term METHODSnewInstantiates a new "SQL::Statement::Function::Trim" instance. Takes $owner, $spec, $char and \@params as arguments (in specified order).Meaning of the parameters:
valueReturns the trimmed value of first parameter argument.NAMESQL::Statement::Function::SubString - implements the built-in sub-string function supportSYNOPSIS# create an substr function term with an SQL::Statement object as owner, # specifying the start and length of the sub string to extract from the # first element of \@params my $term = SQL::Statement::SubString->new( $owner, $start, $length, \@params ); # access the result of that operation $term->value( $eval ); DESCRIPTIONSQL::Statement::Function::SubString implements a sub-string extraction term.INHERITANCESQL::Statement::Function::SubString ISA SQL::Statement::Function ISA SQL::Statement::Term METHODSnewInstantiates a new "SQL::Statement::Function::SubString" instance. Takes $owner, $start, $length and \@params as arguments (in specified order).Meaning of the parameters:
valueReturns the extracted sub-string value from first parameter argument.NAMESQL::Statement::Function::StrConcat - implements the built-in string concatenationSYNOPSIS# create an substr function term with an SQL::Statement object as owner # and \@params to concatenate my $term = SQL::Statement::StrConcat->new( $owner, \@params ); # access the result of that operation $term->value( $eval ); DESCRIPTIONSQL::Statement::Function::StrConcat implements a string concatenation term.INHERITANCESQL::Statement::Function::StrConcat ISA SQL::Statement::Function ISA SQL::Statement::Term METHODSnewInstantiates a new "SQL::Statement::Function::StrConcat" instance.valueReturns the concatenated string composed of the parameter values.AUTHOR AND COPYRIGHTCopyright (c) 2009-2020 by Jens Rehsack: rehsackATcpan.orgAll 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.
|