Changes + Reverts for 0.11000, see Changes file for info
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Schema / Constants.pm
1 package SQL::Translator::Schema::Constants;
2
3 # ----------------------------------------------------------------------
4 # Copyright (C) 2002-2009 SQLFairy Authors
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
23 SQL::Translator::Schema::Constants - constants module
24
25 =head1 SYNOPSIS
26
27   use SQL::Translator::Schema::Constants;
28
29   $table->add_constraint(
30       name => 'foo',
31       type => PRIMARY_KEY,
32   );
33
34 =head1 DESCRIPTION
35
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
57
58 =cut
59
60 use strict;
61 use base qw( Exporter );
62 use vars qw( @EXPORT $VERSION );
63 require Exporter;
64 $VERSION = '1.59';
65
66 @EXPORT = qw[ 
67     CHECK_C
68     FOREIGN_KEY
69     FULL_TEXT
70     SPATIAL
71     NOT_NULL
72     NORMAL
73     NULL
74     PRIMARY_KEY
75     UNIQUE
76 ];
77
78 #
79 # Because "CHECK" is a Perl keyword
80 #
81 use constant CHECK_C => 'CHECK';
82
83 use constant FOREIGN_KEY => 'FOREIGN KEY';
84
85 use constant FULL_TEXT => 'FULLTEXT';
86
87 use constant SPATIAL => 'SPATIAL';
88
89 use constant NOT_NULL => 'NOT NULL';
90
91 use constant NORMAL => 'NORMAL';
92
93 use constant NULL => 'NULL';
94
95 use constant PRIMARY_KEY => 'PRIMARY KEY';
96
97 use constant UNIQUE => 'UNIQUE';
98
99 1;
100
101 # ----------------------------------------------------------------------
102
103 =pod
104
105 =head1 AUTHOR
106
107 Ken Youens-Clark E<lt>kclark@cpan.orgE<gt>.
108
109 =cut