Commit | Line | Data |
0f3cc5c0 |
1 | package SQL::Translator::Schema::Constants; |
2 | |
3 | # ---------------------------------------------------------------------- |
6606c4c6 |
4 | # $Id: Constants.pm,v 1.43 2004-02-09 22:15:15 kycl4rk Exp $ |
0f3cc5c0 |
5 | # ---------------------------------------------------------------------- |
6606c4c6 |
6 | # Copyright (C) 2002-4 SQLFairy Authors |
0f3cc5c0 |
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 | |
79dbb3a4 |
25 | SQL::Translator::Schema::Constants - constants module |
0f3cc5c0 |
26 | |
27 | =head1 SYNOPSIS |
28 | |
79dbb3a4 |
29 | use SQL::Translator::Schema::Constants; |
0f3cc5c0 |
30 | |
31 | $table->add_constraint( |
32 | name => 'foo', |
33 | type => PRIMARY_KEY, |
34 | ); |
35 | |
36 | =head1 DESCRIPTION |
37 | |
a2bec465 |
38 | This module exports the following constants for Schema features; |
39 | |
40 | =over 4 |
41 | |
42 | =item CHECK_C |
43 | |
44 | =item FOREIGN_KEY |
45 | |
46 | =item FULL_TEXT |
47 | |
48 | =item NOT_NULL |
49 | |
50 | =item NORMAL |
51 | |
52 | =item NULL |
53 | |
54 | =item PRIMARY_KEY |
55 | |
56 | =item UNIQUE |
57 | |
58 | =back |
0f3cc5c0 |
59 | |
60 | =cut |
61 | |
62 | use strict; |
63 | use base qw( Exporter ); |
64 | use vars qw( @EXPORT $VERSION ); |
65 | require Exporter; |
6606c4c6 |
66 | $VERSION = sprintf "%d.%02d", q$Revision: 1.43 $ =~ /(\d+)\.(\d+)/; |
0f3cc5c0 |
67 | |
68 | @EXPORT = qw[ |
43b9dc7a |
69 | CHECK_C |
70 | FOREIGN_KEY |
8ff0b2bc |
71 | FULL_TEXT |
43b9dc7a |
72 | NOT_NULL |
8ff0b2bc |
73 | NORMAL |
43b9dc7a |
74 | NULL |
0f3cc5c0 |
75 | PRIMARY_KEY |
43b9dc7a |
76 | UNIQUE |
0f3cc5c0 |
77 | ]; |
78 | |
43b9dc7a |
79 | # |
80 | # Because "CHECK" is a Perl keyword |
81 | # |
82 | use constant CHECK_C => 'CHECK'; |
83 | |
8ff0b2bc |
84 | use constant FOREIGN_KEY => 'FOREIGN KEY'; |
43b9dc7a |
85 | |
a562f8d0 |
86 | use constant FULL_TEXT => 'FULLTEXT'; |
8ff0b2bc |
87 | |
88 | use constant NOT_NULL => 'NOT NULL'; |
89 | |
90 | use constant NORMAL => 'NORMAL'; |
43b9dc7a |
91 | |
92 | use constant NULL => 'NULL'; |
93 | |
8ff0b2bc |
94 | use constant PRIMARY_KEY => 'PRIMARY KEY'; |
43b9dc7a |
95 | |
96 | use constant UNIQUE => 'UNIQUE'; |
0f3cc5c0 |
97 | |
98 | 1; |
99 | |
6606c4c6 |
100 | # ---------------------------------------------------------------------- |
101 | |
0f3cc5c0 |
102 | =pod |
103 | |
104 | =head1 AUTHOR |
105 | |
6606c4c6 |
106 | Ken Y. Clark E<lt>kclark@cpan.orgE<gt>. |
0f3cc5c0 |
107 | |
108 | =cut |