blib/lib/SQL/Translator/Schema/Constants.pm

filter: Statementstmt 100% 43 / 43 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 13 / 13 Podpod n/a totaltotal 100% 56 / 56 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/SQL/Translator/Producer/XML.pm ↑ Summary blib/lib/SQL/Translator/Schema/Object.pm »
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 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
45 80 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
46 80 ▶use base qw( Exporter );
Subroutine BEGIN: called CC=1 SCAR=0.0
47 80 require Exporter;
48 80 our $VERSION = '1.66';
49  
50 80 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 ▶use constant CHECK_C => 'CHECK';
Subroutine BEGIN: called CC=1 SCAR=0.0
67  
68 80 ▶use constant FOREIGN_KEY => 'FOREIGN KEY';
Subroutine BEGIN: called CC=1 SCAR=0.0
69  
70 80 ▶use constant FULL_TEXT => 'FULLTEXT';
Subroutine BEGIN: called CC=1 SCAR=0.0
71  
72 80 ▶use constant SPATIAL => 'SPATIAL';
Subroutine BEGIN: called CC=1 SCAR=0.0
73  
74 80 ▶use constant NOT_NULL => 'NOT NULL';
Subroutine BEGIN: called CC=1 SCAR=0.0
75  
76 80 ▶use constant NORMAL => 'NORMAL';
Subroutine BEGIN: called CC=1 SCAR=0.0
77  
78 80 ▶use constant NULL => 'NULL';
Subroutine BEGIN: called CC=1 SCAR=0.0
79  
80 80 ▶use constant PRIMARY_KEY => 'PRIMARY KEY';
Subroutine BEGIN: called CC=1 SCAR=0.0
81  
82 80 ▶use constant UNIQUE => 'UNIQUE';
Subroutine BEGIN: called CC=1 SCAR=0.0
83  
84 80 ▶use constant EXCLUDE => 'EXCLUDE';
Subroutine BEGIN: called CC=1 SCAR=0.0
85  
86 80 1;
87  
88 =pod
89  
90 =head1 AUTHOR
91  
92 Ken Youens-Clark E<lt>kclark@cpan.orgE<gt>.
93  
94 =cut
« blib/lib/SQL/Translator/Producer/XML.pm ↑ Summary blib/lib/SQL/Translator/Schema/Object.pm »