File: Constants.pm

package info (click to toggle)
libsql-translator-perl 1.66-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,680 kB
  • sloc: perl: 67,870; sql: 4,150; xml: 258; makefile: 14
file content (94 lines) | stat: -rw-r--r-- 1,207 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package SQL::Translator::Schema::Constants;

=head1 NAME

SQL::Translator::Schema::Constants - constants module

=head1 SYNOPSIS

  use SQL::Translator::Schema::Constants;

  $table->add_constraint(
      name => 'foo',
      type => PRIMARY_KEY,
  );

=head1 DESCRIPTION

This module exports the following constants for Schema features;

=over 4

=item CHECK_C

=item FOREIGN_KEY

=item FULL_TEXT

=item NOT_NULL

=item NORMAL

=item NULL

=item PRIMARY_KEY

=item UNIQUE

=item EXCLUDE

=back

=cut

use strict;
use warnings;
use base qw( Exporter );
require Exporter;
our $VERSION = '1.66';

our @EXPORT = qw[
  CHECK_C
  FOREIGN_KEY
  FULL_TEXT
  SPATIAL
  NOT_NULL
  NORMAL
  NULL
  PRIMARY_KEY
  UNIQUE
  EXCLUDE
];

#
# Because "CHECK" is a Perl keyword
#
use constant CHECK_C => 'CHECK';

use constant FOREIGN_KEY => 'FOREIGN KEY';

use constant FULL_TEXT => 'FULLTEXT';

use constant SPATIAL => 'SPATIAL';

use constant NOT_NULL => 'NOT NULL';

use constant NORMAL => 'NORMAL';

use constant NULL => 'NULL';

use constant PRIMARY_KEY => 'PRIMARY KEY';

use constant UNIQUE => 'UNIQUE';

use constant EXCLUDE => 'EXCLUDE';

1;

=pod

=head1 AUTHOR

Ken Youens-Clark E<lt>kclark@cpan.orgE<gt>.

=cut