Commit | Line | Data |
---|---|---|
0f3cc5c0 | 1 | package SQL::Translator::Schema::Constants; |
2 | ||
0f3cc5c0 | 3 | =head1 NAME |
4 | ||
79dbb3a4 | 5 | SQL::Translator::Schema::Constants - constants module |
0f3cc5c0 | 6 | |
7 | =head1 SYNOPSIS | |
8 | ||
79dbb3a4 | 9 | use SQL::Translator::Schema::Constants; |
0f3cc5c0 | 10 | |
11 | $table->add_constraint( | |
12 | name => 'foo', | |
13 | type => PRIMARY_KEY, | |
14 | ); | |
15 | ||
16 | =head1 DESCRIPTION | |
17 | ||
a2bec465 | 18 | This module exports the following constants for Schema features; |
19 | ||
20 | =over 4 | |
21 | ||
22 | =item CHECK_C | |
23 | ||
24 | =item FOREIGN_KEY | |
25 | ||
26 | =item FULL_TEXT | |
27 | ||
28 | =item NOT_NULL | |
29 | ||
30 | =item NORMAL | |
31 | ||
32 | =item NULL | |
33 | ||
34 | =item PRIMARY_KEY | |
35 | ||
36 | =item UNIQUE | |
37 | ||
38 | =back | |
0f3cc5c0 | 39 | |
40 | =cut | |
41 | ||
42 | use strict; | |
f27f9229 | 43 | use warnings; |
0f3cc5c0 | 44 | use base qw( Exporter ); |
0f3cc5c0 | 45 | require Exporter; |
0c04c5a2 | 46 | our $VERSION = '1.59'; |
0f3cc5c0 | 47 | |
0c04c5a2 | 48 | our @EXPORT = qw[ |
43b9dc7a | 49 | CHECK_C |
50 | FOREIGN_KEY | |
8ff0b2bc | 51 | FULL_TEXT |
531652d6 | 52 | SPATIAL |
43b9dc7a | 53 | NOT_NULL |
8ff0b2bc | 54 | NORMAL |
43b9dc7a | 55 | NULL |
0f3cc5c0 | 56 | PRIMARY_KEY |
43b9dc7a | 57 | UNIQUE |
0f3cc5c0 | 58 | ]; |
59 | ||
43b9dc7a | 60 | # |
61 | # Because "CHECK" is a Perl keyword | |
62 | # | |
63 | use constant CHECK_C => 'CHECK'; | |
64 | ||
8ff0b2bc | 65 | use constant FOREIGN_KEY => 'FOREIGN KEY'; |
43b9dc7a | 66 | |
a562f8d0 | 67 | use constant FULL_TEXT => 'FULLTEXT'; |
8ff0b2bc | 68 | |
531652d6 | 69 | use constant SPATIAL => 'SPATIAL'; |
70 | ||
8ff0b2bc | 71 | use constant NOT_NULL => 'NOT NULL'; |
72 | ||
73 | use constant NORMAL => 'NORMAL'; | |
43b9dc7a | 74 | |
75 | use constant NULL => 'NULL'; | |
76 | ||
8ff0b2bc | 77 | use constant PRIMARY_KEY => 'PRIMARY KEY'; |
43b9dc7a | 78 | |
79 | use constant UNIQUE => 'UNIQUE'; | |
0f3cc5c0 | 80 | |
81 | 1; | |
82 | ||
83 | =pod | |
84 | ||
85 | =head1 AUTHOR | |
86 | ||
c3b0b535 | 87 | Ken Youens-Clark E<lt>kclark@cpan.orgE<gt>. |
0f3cc5c0 | 88 | |
89 | =cut |