Commit | Line | Data |
0f3cc5c0 |
1 | package SQL::Translator::Schema::Constants; |
2 | |
3 | # ---------------------------------------------------------------------- |
478f608d |
4 | # Copyright (C) 2002-2009 SQLFairy Authors |
0f3cc5c0 |
5 | # |
6 | # This program is free software; you can redistribute it and/or |
7 | # modify it under the terms of the GNU General Public License as |
8 | # published by the Free Software Foundation; version 2. |
9 | # |
10 | # This program is distributed in the hope that it will be useful, but |
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | # General Public License for more details. |
14 | # |
15 | # You should have received a copy of the GNU General Public License |
16 | # along with this program; if not, write to the Free Software |
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
18 | # 02111-1307 USA |
19 | # ------------------------------------------------------------------- |
20 | |
21 | =head1 NAME |
22 | |
79dbb3a4 |
23 | SQL::Translator::Schema::Constants - constants module |
0f3cc5c0 |
24 | |
25 | =head1 SYNOPSIS |
26 | |
79dbb3a4 |
27 | use SQL::Translator::Schema::Constants; |
0f3cc5c0 |
28 | |
29 | $table->add_constraint( |
30 | name => 'foo', |
31 | type => PRIMARY_KEY, |
32 | ); |
33 | |
34 | =head1 DESCRIPTION |
35 | |
a2bec465 |
36 | This module exports the following constants for Schema features; |
37 | |
38 | =over 4 |
39 | |
40 | =item CHECK_C |
41 | |
42 | =item FOREIGN_KEY |
43 | |
44 | =item FULL_TEXT |
45 | |
46 | =item NOT_NULL |
47 | |
48 | =item NORMAL |
49 | |
50 | =item NULL |
51 | |
52 | =item PRIMARY_KEY |
53 | |
54 | =item UNIQUE |
55 | |
56 | =back |
0f3cc5c0 |
57 | |
58 | =cut |
59 | |
60 | use strict; |
61 | use base qw( Exporter ); |
da06ac74 |
62 | use vars qw( @EXPORT $VERSION ); |
0f3cc5c0 |
63 | require Exporter; |
4ab3763d |
64 | $VERSION = '1.59'; |
0f3cc5c0 |
65 | |
66 | @EXPORT = qw[ |
43b9dc7a |
67 | CHECK_C |
68 | FOREIGN_KEY |
8ff0b2bc |
69 | FULL_TEXT |
531652d6 |
70 | SPATIAL |
43b9dc7a |
71 | NOT_NULL |
8ff0b2bc |
72 | NORMAL |
43b9dc7a |
73 | NULL |
0f3cc5c0 |
74 | PRIMARY_KEY |
43b9dc7a |
75 | UNIQUE |
0f3cc5c0 |
76 | ]; |
77 | |
43b9dc7a |
78 | # |
79 | # Because "CHECK" is a Perl keyword |
80 | # |
81 | use constant CHECK_C => 'CHECK'; |
82 | |
8ff0b2bc |
83 | use constant FOREIGN_KEY => 'FOREIGN KEY'; |
43b9dc7a |
84 | |
a562f8d0 |
85 | use constant FULL_TEXT => 'FULLTEXT'; |
8ff0b2bc |
86 | |
531652d6 |
87 | use constant SPATIAL => 'SPATIAL'; |
88 | |
8ff0b2bc |
89 | use constant NOT_NULL => 'NOT NULL'; |
90 | |
91 | use constant NORMAL => 'NORMAL'; |
43b9dc7a |
92 | |
93 | use constant NULL => 'NULL'; |
94 | |
8ff0b2bc |
95 | use constant PRIMARY_KEY => 'PRIMARY KEY'; |
43b9dc7a |
96 | |
97 | use constant UNIQUE => 'UNIQUE'; |
0f3cc5c0 |
98 | |
99 | 1; |
100 | |
6606c4c6 |
101 | # ---------------------------------------------------------------------- |
102 | |
0f3cc5c0 |
103 | =pod |
104 | |
105 | =head1 AUTHOR |
106 | |
6606c4c6 |
107 | Ken Y. Clark E<lt>kclark@cpan.orgE<gt>. |
0f3cc5c0 |
108 | |
109 | =cut |