SQL::Translator::Schema::Procedure - SQL::Translator procedure object
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,
);
SQL::Translator::Schema::Procedure
is a class for dealing with stored procedures (and possibly other pieces of nameable SQL code?).
Object constructor.
my $schema = SQL::Translator::Schema::Procedure->new;
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;
Get or set the procedure's name.
$procedure->name('foo');
my $name = $procedure->name;
Get or set the procedure's SQL.
$procedure->sql('select * from foo');
my $sql = $procedure->sql;
Get or set the order of the procedure.
$procedure->order( 3 );
my $order = $procedure->order;
Get or set the owner of the procedure.
$procedure->owner('nomar');
my $sql = $procedure->owner;
Get or set the comments on a procedure.
$procedure->comments('foo');
$procedure->comments('bar');
print join( ', ', $procedure->comments ); # prints "foo, bar"
Get or set the procedures's schema object.
$procedure->schema( $schema );
my $schema = $procedure->schema;
Determines if this procedure is the same as another
my $isIdentical = $procedure1->equals( $procedure2 );
Ken Youens-Clark <kclark@cshl.org>, Paul Harrington <Paul-Harrington@deshaw.com>.