table of contents
SQL::Translator::Schema::Procedure(3) | User Contributed Perl Documentation | SQL::Translator::Schema::Procedure(3) |
NAME¶
SQL::Translator::Schema::Procedure - SQL::Translator procedure object
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 a class for dealing with stored procedures (and possibly other pieces of nameable SQL code?).
METHODS¶
new¶
Object constructor.
my $schema = SQL::Translator::Schema::Procedure->new;
parameters¶
Gets and set the parameters of the stored procedure.
$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.
$procedure->name('foo'); my $name = $procedure->name;
sql¶
Get or set the procedure's SQL.
$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.
$procedure->comments('foo'); $procedure->comments('bar'); print join( ', ', $procedure->comments ); # prints "foo, bar"
schema¶
Get or set the procedures's schema object.
$procedure->schema( $schema ); my $schema = $procedure->schema;
equals¶
Determines if this procedure is the same as another
my $isIdentical = $procedure1->equals( $procedure2 );
AUTHORS¶
Ken Youens-Clark <kclark@cshl.org>, Paul Harrington <Paul-Harrington@deshaw.com>.
2024-03-08 | perl v5.40.0 |