File Coverage

blib/lib/SQL/Translator/Schema/Constants.pm
Criterion Covered Total %
statement 39 39 100.0
branch n/a
condition n/a
subroutine 13 13 100.0
pod n/a
total 52 52 100.0


line stmt bran cond sub pod time code
1             package SQL::Translator::Schema::Constants;
2              
3             =head1 NAME
4              
5             SQL::Translator::Schema::Constants - constants module
6              
7             =head1 SYNOPSIS
8              
9             use SQL::Translator::Schema::Constants;
10              
11             $table->add_constraint(
12             name => 'foo',
13             type => PRIMARY_KEY,
14             );
15              
16             =head1 DESCRIPTION
17              
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             =item EXCLUDE
39              
40             =back
41              
42             =cut
43              
44 80     80   222195 use strict;
  80         239  
  80         3707  
45 80     80   492 use warnings;
  80         179  
  80         4860  
46 80     80   506 use base qw( Exporter );
  80         307  
  80         18872  
47             require Exporter;
48             our $VERSION = '1.66';
49              
50             our @EXPORT = qw[
51             CHECK_C
52             FOREIGN_KEY
53             FULL_TEXT
54             SPATIAL
55             NOT_NULL
56             NORMAL
57             NULL
58             PRIMARY_KEY
59             UNIQUE
60             EXCLUDE
61             ];
62              
63             #
64             # Because "CHECK" is a Perl keyword
65             #
66 80     80   649 use constant CHECK_C => 'CHECK';
  80         202  
  80         8435  
67              
68 80     80   555 use constant FOREIGN_KEY => 'FOREIGN KEY';
  80         224  
  80         5213  
69              
70 80     80   539 use constant FULL_TEXT => 'FULLTEXT';
  80         151  
  80         4709  
71              
72 80     80   2899 use constant SPATIAL => 'SPATIAL';
  80         208  
  80         4550  
73              
74 80     80   424 use constant NOT_NULL => 'NOT NULL';
  80         176  
  80         4622  
75              
76 80     80   587 use constant NORMAL => 'NORMAL';
  80         194  
  80         4365  
77              
78 80     80   466 use constant NULL => 'NULL';
  80         218  
  80         4539  
79              
80 80     80   669 use constant PRIMARY_KEY => 'PRIMARY KEY';
  80         199  
  80         4587  
81              
82 80     80   599 use constant UNIQUE => 'UNIQUE';
  80         232  
  80         4782  
83              
84 80     80   466 use constant EXCLUDE => 'EXCLUDE';
  80         296  
  80         5526  
85              
86             1;
87              
88             =pod
89              
90             =head1 AUTHOR
91              
92             Ken Youens-Clark Ekclark@cpan.orgE.
93              
94             =cut