SQL::S...nction(3pm)
๐ธ SQL::Statement::Function(3pm) ๐
okay so bestie ๐ welcome to the manual page for SQL::Statement::Function(3pm), coming at you live from the User Contributed Perl Documentation. and ngl, this page is not one module โ it's a whole friend group ๐: one abstract base class plus five little function-executing terms that inherit from it. let's meet them one by one, no skipping, i promise. โจ
๐ SQL::Statement::Function
NAME ๐
SQL::Statement::Function โ the abstract base class for all function executing terms. she's the blueprint, not the building, and honestly? queen behavior.
SYNOPSIS ๐ธ
# this class does not have a common constructor, because all derived classes
# have their special requirements
DESCRIPTION โจ
SQL::Statement::Function is an abstract base class, and what she does is provide the interface for all function executing terms. literally the template everybody else copies off of. no cap.
INHERITANCE ๐
SQL::Statement::Function
ISA SQL::Statement::Term
METHODS ๐
DESTROY
Destroys the term, and while she's at it she undefines the weak reference to the owner and the reference to the parameter list. clean exit, tidy girl, iconic.
๐ฆ SQL::Statement::Function::UserFunc
NAME ๐
SQL::Statement::Function::UserFunc โ this one implements executing a perl subroutine. yes, we're calling your own subs now, slay.
SYNOPSIS ๐ธ
# 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 );
DESCRIPTION โจ
SQL::Statement::Function::UserFunc implements a term which returns the result of the specified subroutine. she's the middleman and she's thriving.
INHERITANCE ๐
SQL::Statement::Function
ISA SQL::Statement::Term
METHODS ๐
new
Instantiates a new "SQL::Statement::Function::UserFunc" instance. fresh out the box ๐.
value
Invokes the given subroutine with the values of the params and returns its result โ the vibe is exactly this:
my @params = map { $_->value($eval); } @{ $self->{PARAMS} };
return $subpkg->$subname( $self->{OWNER}, @params );
๐ SQL::Statement::Function::NumericEval
NAME ๐
SQL::Statement::Function::NumericEval โ implements numeric evaluation of a term. math girlies rise ๐งฎโจ.
SYNOPSIS ๐ธ
# 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::Function::NumericEval->new( $owner, $expr, \@params );
# access the result of that operation
$term->value( $eval );
DESCRIPTION โจ
SQL::Statement::Function::NumericEval implements the numeric evaluation of a term. heads up bestie: all parameters are expected to be numeric. don't bring strings to a numbers party.
INHERITANCE ๐
SQL::Statement::Function::NumericEval
ISA SQL::Statement::Function
ISA SQL::Statement::Term
METHODS ๐
new
Instantiates a new "SQL::Statement::Function::NumericEval" instance. Takes $owner, $expr and \@params as arguments, in exactly that order โ order matters, periodt.
value
Returns the result of the evaluated expression. that's it, that's the whole job ๐.
๐ SQL::Statement::Function::Trim
NAME ๐
SQL::Statement::Function::Trim โ implements the built-in trim function support. she trims. it's giving haircut but for strings โ๏ธ.
SYNOPSIS ๐ธ
# 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::Function::Trim->new( $owner, $spec, $char, \@params );
# access the result of that operation
$term->value( $eval );
DESCRIPTION โจ
SQL::Statement::Function::Trim implements string trimming. so clean, so fresh ๐งผ.
INHERITANCE ๐
SQL::Statement::Function::Trim
ISA SQL::Statement::Function
ISA SQL::Statement::Term
METHODS ๐
new
Instantiates a new "SQL::Statement::Function::Trim" instance. Takes $owner, $spec, $char and \@params as arguments, in that exact specified order.
and now, the meaning of the parameters ๐ซถ:
$specโ can be one of'LEADING','TRAILING','BOTH'. Trims the leading chars, the trailing chars, or both ends, respectively. Defaults to'BOTH'.$charโ the character to trim. defaults to' '.\@paramsโ expected to be an array with exact 1 element (any more than that are not evaluated, so don't bother adding extras bestie).
value
Returns the trimmed value of the first parameter argument. ๐
๐ง SQL::Statement::Function::SubString
NAME ๐
SQL::Statement::Function::SubString โ implements the built-in sub-string function support. slicing strings like a boss ๐ฅ.
SYNOPSIS ๐ธ
# 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 );
DESCRIPTION โจ
SQL::Statement::Function::SubString implements a sub-string extraction term. give her a string, she gives you a piece of it. generous.
INHERITANCE ๐
SQL::Statement::Function::SubString
ISA SQL::Statement::Function
ISA SQL::Statement::Term
METHODS ๐
new
Instantiates a new "SQL::Statement::Function::SubString" instance. Takes $owner, $start, $length and \@params as arguments, in the specified order โ yes, order, always order.
meaning of the parameters, let's break it down ๐ธ:
$startโ specifies the start position to extract the sub-string. this is expected to be aSQL::Statement::Terminstance. and the important detail: the first character in a string has the position1. (not zero, bestie, do not come in here with your zero-indexed nonsense ๐)$lengthโ specifies the length of the extracted sub-string. this is expected to be aSQL::Statement::Terminstance. if omitted, everything to the end of the string is returned. so generous, so effortless โจ\@paramsโ expected to be an array with exact 1 element (more are not evaluated).
value
Returns the extracted sub-string value from the first parameter argument. periodt. ๐
๐ SQL::Statement::Function::StrConcat
NAME ๐
SQL::Statement::Function::StrConcat โ implements the built-in string concatenation. she's the glue holding your strings together, literally ๐ซถ.
SYNOPSIS ๐ธ
# 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 );
DESCRIPTION โจ
SQL::Statement::Function::StrConcat implements a string concatenation term. smash those strings together, main character energy ๐.
INHERITANCE ๐
SQL::Statement::Function::StrConcat
ISA SQL::Statement::Function
ISA SQL::Statement::Term
METHODS ๐
new
Instantiates a new "SQL::Statement::Function::StrConcat" instance. that's the whole description, she's lowkey simple like that.
value
Returns the concatenated string composed of the parameter values. all of them, joined, one happy little family ๐.
๐ 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.
and that's the whole page bestie ๐ ty for reading to the end, you ate. this was SQL::S...nction(3pm) from perl v5.30.3, dated 2020-10-23, in the User Contributed Perl Documentation ๐
โจ no cap, see you in the next man page. ๐ฆ
๐ฆ where this page comes from
- debian bookworm: libsql-statement-perl 1.414-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libsql-statement-perl 1.414-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libsql-statement-perl 1.414-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libsql-statement-perl 1.414-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsql-statement-perl 1.414-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsql-statement-perl 1.414-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms