1SQL::Translator::SchemaU:s:ePrroCcoendturrieb(u3t)ed PerSlQLD:o:cTurmaennstlaattioorn::Schema::Procedure(3)
2
3
4
6 SQL::Translator::Schema::Procedure - SQL::Translator procedure object
7
9 use SQL::Translator::Schema::Procedure;
10 my $procedure = SQL::Translator::Schema::Procedure->new(
11 name => 'foo',
12 sql => 'CREATE PROC foo AS SELECT * FROM bar',
13 parameters => 'foo,bar',
14 owner => 'nomar',
15 comments => 'blah blah blah',
16 schema => $schema,
17 );
18
20 "SQL::Translator::Schema::Procedure" is a class for dealing with stored
21 procedures (and possibly other pieces of nameable SQL code?).
22
24 new
25 Object constructor.
26
27 my $schema = SQL::Translator::Schema::Procedure->new;
28
29 parameters
30 Gets and set the parameters of the stored procedure.
31
32 $procedure->parameters('id');
33 $procedure->parameters('id', 'name');
34 $procedure->parameters( 'id, name' );
35 $procedure->parameters( [ 'id', 'name' ] );
36 $procedure->parameters( qw[ id name ] );
37
38 my @parameters = $procedure->parameters;
39
40 name
41 Get or set the procedure's name.
42
43 $procedure->name('foo');
44 my $name = $procedure->name;
45
46 sql
47 Get or set the procedure's SQL.
48
49 $procedure->sql('select * from foo');
50 my $sql = $procedure->sql;
51
52 order
53 Get or set the order of the procedure.
54
55 $procedure->order( 3 );
56 my $order = $procedure->order;
57
58 owner
59 Get or set the owner of the procedure.
60
61 $procedure->owner('nomar');
62 my $sql = $procedure->owner;
63
64 comments
65 Get or set the comments on a procedure.
66
67 $procedure->comments('foo');
68 $procedure->comments('bar');
69 print join( ', ', $procedure->comments ); # prints "foo, bar"
70
71 schema
72 Get or set the procedures's schema object.
73
74 $procedure->schema( $schema );
75 my $schema = $procedure->schema;
76
77 equals
78 Determines if this procedure is the same as another
79
80 my $isIdentical = $procedure1->equals( $procedure2 );
81
83 Ken Youens-Clark <kclark@cshl.org>, Paul Harrington
84 <Paul-Harrington@deshaw.com>.
85
86
87
88perl v5.32.1 2021-01-S2Q7L::Translator::Schema::Procedure(3)