Commit | Line | Data |
0f3cc5c0 |
1 | package SQL::Translator::Schema::Constants; |
2 | |
3 | # ---------------------------------------------------------------------- |
43b9dc7a |
4 | # $Id: Constants.pm,v 1.2 2003-05-05 04:32:39 kycl4rk Exp $ |
0f3cc5c0 |
5 | # ---------------------------------------------------------------------- |
6 | # Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org> |
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. |
11 | # |
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. |
16 | # |
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 | |
23 | =head1 NAME |
24 | |
25 | SQL::Translator::CMap::Constants - constants module |
26 | |
27 | =head1 SYNOPSIS |
28 | |
29 | use SQL::Translator::CMap::Constants; |
30 | |
31 | $table->add_constraint( |
32 | name => 'foo', |
33 | type => PRIMARY_KEY, |
34 | ); |
35 | |
36 | =head1 DESCRIPTION |
37 | |
38 | This module exports a several constants to like "primary key," etc. |
39 | |
40 | =cut |
41 | |
42 | use strict; |
43 | use base qw( Exporter ); |
44 | use vars qw( @EXPORT $VERSION ); |
45 | require Exporter; |
43b9dc7a |
46 | $VERSION = (qw$Revision: 1.2 $)[-1]; |
0f3cc5c0 |
47 | |
48 | @EXPORT = qw[ |
43b9dc7a |
49 | CHECK_C |
50 | FOREIGN_KEY |
51 | NOT_NULL |
52 | NULL |
0f3cc5c0 |
53 | PRIMARY_KEY |
43b9dc7a |
54 | UNIQUE |
0f3cc5c0 |
55 | ]; |
56 | |
43b9dc7a |
57 | # |
58 | # Because "CHECK" is a Perl keyword |
59 | # |
60 | use constant CHECK_C => 'CHECK'; |
61 | |
62 | use constant FOREIGN_KEY => 'FOREIGN_KEY'; |
63 | |
64 | use constant NOT_NULL => 'NOT_NULL'; |
65 | |
66 | use constant NULL => 'NULL'; |
67 | |
68 | use constant PRIMARY_KEY => 'PRIMARY_KEY'; |
69 | |
70 | use constant UNIQUE => 'UNIQUE'; |
0f3cc5c0 |
71 | |
72 | 1; |
73 | |
74 | =pod |
75 | |
76 | =head1 AUTHOR |
77 | |
78 | Ken Y. Clark E<lt>kclark@cpan.orgE<gt> |
79 | |
80 | =head1 COPYRIGHT |
81 | |
82 | Copyright (c) 2003 |
83 | |
84 | This library is free software; you can redistribute it and/or modify |
85 | it under the same terms as Perl itself. |
86 | |
87 | =cut |