Document producer methods
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer.pm
CommitLineData
16dc9970 1package SQL::Translator::Producer;
2
49e1eb70 3# -------------------------------------------------------------------
0e1ec14f 4# $Id: Producer.pm,v 1.8 2006-06-07 16:28:59 schiffbruechige Exp $
49e1eb70 5# -------------------------------------------------------------------
977651a5 6# Copyright (C) 2002-4 SQLFairy Authors
077ebf34 7#
8# This program is free software; you can redistribute it and/or
9# modify it under the terms of the GNU General Public License as
10# published by the Free Software Foundation; version 2.
16dc9970 11#
077ebf34 12# This program is distributed in the hope that it will be useful, but
13# WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15# General Public License for more details.
16dc9970 16#
077ebf34 17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20# 02111-1307 USA
21# -------------------------------------------------------------------
22
23use strict;
24use vars qw($VERSION);
0e1ec14f 25$VERSION = sprintf "%d.%02d", q$Revision: 1.8 $ =~ /(\d+)\.(\d+)/;
16dc9970 26
077ebf34 27sub produce { "" }
16dc9970 28
291;
30
49e1eb70 31# -------------------------------------------------------------------
16dc9970 32# A burnt child loves the fire.
33# Oscar Wilde
49e1eb70 34# -------------------------------------------------------------------
35
36=pod
16dc9970 37
38=head1 NAME
39
56435d6f 40SQL::Translator::Producer - describes how to write a producer
16dc9970 41
16dc9970 42=head1 DESCRIPTION
43
077ebf34 44Producer modules designed to be used with SQL::Translator need to
45implement a single function, called B<produce>. B<produce> will be
56435d6f 46called with the SQL::Translator object from which it is expected to
47retrieve the SQL::Translator::Schema object which has been populated
48by the parser. It is expected to return a string.
16dc9970 49
0e1ec14f 50=head1 METHODS
51
52=over 4
53
54=item produce
55
56=item create_table($table)
57
58=item create_field($field)
59
60=item create_view($view)
61
62=item create_index($index)
63
64=item create_constraint($constraint)
65
66=item create_trigger($trigger)
67
68=item alter_field($from_field, $to_field)
69
70=item add_field($table, $new_field)
71
72=item drop_field($table, $old_field)
73
56435d6f 74=head1 AUTHORS
16dc9970 75
56435d6f 76Darren Chamberlain E<lt>darren@cpan.orgE<gt>,
77Ken Y. Clark E<lt>kclark@cpan.orgE<gt>.
16dc9970 78
79=head1 SEE ALSO
80
56435d6f 81perl(1), SQL::Translator, SQL::Translator::Schema.
16dc9970 82
83=cut