File Coverage

blib/lib/SQL/Translator/Schema/Constants.pm
Criterion Covered Total %
statement 36 36 100.0
branch n/a
condition n/a
subroutine 12 12 100.0
pod n/a
total 48 48 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             =back
39              
40             =cut
41              
42 77     77   212272 use strict;
  77         188  
  77         2300  
43 77     77   410 use warnings;
  77         177  
  77         2162  
44 77     77   433 use base qw( Exporter );
  77         188  
  77         13690  
45             require Exporter;
46             our $VERSION = '1.62';
47              
48             our @EXPORT = qw[
49             CHECK_C
50             FOREIGN_KEY
51             FULL_TEXT
52             SPATIAL
53             NOT_NULL
54             NORMAL
55             NULL
56             PRIMARY_KEY
57             UNIQUE
58             ];
59              
60             #
61             # Because "CHECK" is a Perl keyword
62             #
63 77     77   686 use constant CHECK_C => 'CHECK';
  77         172  
  77         6417  
64              
65 77     77   525 use constant FOREIGN_KEY => 'FOREIGN KEY';
  77         166  
  77         4255  
66              
67 77     77   498 use constant FULL_TEXT => 'FULLTEXT';
  77         187  
  77         4340  
68              
69 77     77   565 use constant SPATIAL => 'SPATIAL';
  77         252  
  77         4228  
70              
71 77     77   840 use constant NOT_NULL => 'NOT NULL';
  77         340  
  77         4039  
72              
73 77     77   475 use constant NORMAL => 'NORMAL';
  77         161  
  77         3832  
74              
75 77     77   458 use constant NULL => 'NULL';
  77         171  
  77         4083  
76              
77 77     77   485 use constant PRIMARY_KEY => 'PRIMARY KEY';
  77         166  
  77         3902  
78              
79 77     77   507 use constant UNIQUE => 'UNIQUE';
  77         179  
  77         4705  
80              
81             1;
82              
83             =pod
84              
85             =head1 AUTHOR
86              
87             Ken Youens-Clark Ekclark@cpan.orgE.
88              
89             =cut