SQL::Tr...ocedure(3)
π NAME π
Okay bestie, this SQL::Tr...ocedure(3) page from User Contributed Perl Documentation is all about SQL::Translator::Schema::Procedure β literally a class for dealing with stored procedures (and possibly other pieces of nameable SQL code?). iykyk β¨
πΈ SYNOPSIS πΈ
use SQL::Translator::Schema::Procedure;
my $procedure = SQL::Translator::Schema::Procedure->new(
name => 'foo',
sql => 'CREATE PROC foo AS SELECT * FROM bar',
parameters => 'foo,bar',
owner => 'nomar',
comments => 'blah blah blah',
schema => $schema,
);
β¨ DESCRIPTION β¨
SQL::Translator::Schema::Procedure is the class for dealing with stored procedures β and possibly other pieces of nameable SQL code? (the question mark is part of the original vibe, weβre keeping it π«Ά)
π METHODS π
π§ new
Object constructor. It makes the object, bestie.
my $schema = SQL::Translator::Schema::Procedure->new;
π parameters
Gets and sets the parameters of the stored procedure. Look at all these valid call styles β versatile queen π
$procedure->parameters('id');
$procedure->parameters('id', 'name');
$procedure->parameters( 'id, name' );
$procedure->parameters( [ 'id', 'name' ] );
$procedure->parameters( qw[ id name ] );
my @parameters = $procedure->parameters;
π¦ name
Get or set the procedureβs name. Simple, iconic.
$procedure->name('foo');
my $name = $procedure->name;
β sql
Get or set the procedureβs SQL. This is where the actual SQL lives.
$procedure->sql('select * from foo');
my $sql = $procedure->sql;
π order
Get or set the order of the procedure.
$procedure->order( 3 );
my $order = $procedure->order;
π owner
Get or set the owner of the procedure.
$procedure->owner('nomar');
my $sql = $procedure->owner;
π comments
Get or set the comments on a procedure. Yes, plural comments. Yes, join them.
$procedure->comments('foo');
$procedure->comments('bar');
print join( ', ', $procedure->comments ); # prints "foo, bar"
π§ schema
Get or set the procedureβs schema object.
$procedure->schema( $schema );
my $schema = $procedure->schema;
π₯ equals
Determines if this procedure is the same as another. The vibe check, but for procedures.
my $isIdentical = $procedure1->equals( $procedure2 );
π AUTHORS π
Shoutout to Ken Youens-Clark <kclark@cshl.org> and Paul Harrington <Paul-Harrington@deshaw.com>. absolute legends π
okay thatβs the whole page bestie β footer info says perl v5.42.0, dated 2024-12-12. slay and goodbye π β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-SQL-Translator 1.660.0-bp160.1.11 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms