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
26 Object constructor.
27
28 my $schema = SQL::Translator::Schema::Procedure->new;
29
30 parameters
31
32 Gets and set the parameters of the stored procedure.
33
34 $procedure->parameters('id');
35 $procedure->parameters('id', 'name');
36 $procedure->parameters( 'id, name' );
37 $procedure->parameters( [ 'id', 'name' ] );
38 $procedure->parameters( qw[ id name ] );
39
40 my @parameters = $procedure->parameters;
41
42 name
43
44 Get or set the procedure's name.
45
46 $procedure->name('foo');
47 my $name = $procedure->name;
48
49 sql
50
51 Get or set the procedure's SQL.
52
53 $procedure->sql('select * from foo');
54 my $sql = $procedure->sql;
55
56 order
57
58 Get or set the order of the procedure.
59
60 $procedure->order( 3 );
61 my $order = $procedure->order;
62
63 owner
64
65 Get or set the owner of the procedure.
66
67 $procedure->owner('nomar');
68 my $sql = $procedure->owner;
69
70 comments
71
72 Get or set the comments on a procedure.
73
74 $procedure->comments('foo');
75 $procedure->comments('bar');
76 print join( ', ', $procedure->comments ); # prints "foo, bar"
77
78 schema
79
80 Get or set the procedures's schema object.
81
82 $procedure->schema( $schema );
83 my $schema = $procedure->schema;
84
85 equals
86
87 Determines if this procedure is the same as another
88
89 my $isIdentical = $procedure1->equals( $procedure2 );
90
92 Ken Y. Clark <kclark@cshl.org>, Paul Harrington <Paul-Harringā
93 ton@deshaw.com>.
94
95
96
97perl v5.8.8 2007-10-S2Q4L::Translator::Schema::Procedure(3)