ResultDDL/V0.pm

filter: Statementstmt 65.1% 28 / 43 Branchbran 36.6% 11 / 30 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 54.5% 18 / 33 Podpod 100% 31 / 31 totaltotal 64.2% 88 / 137 CC 16 SCAR 10.5
CC
16
Cov
53%
binary
6.0
varbinary
6.0
blob
6.0
CRAP 2.9
« ResultDDL/V1.pm ↑ Summary
1 package DBIx::Class::ResultDDL::V0;
2 3 ▶use DBIx::Class::ResultDDL::V1 -exporter_setup => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 # ABSTRACT: Back-compat for version 0 of this module
6  
7  
8 3 my @V0= qw(
9 table
10 col
11 null default auto_inc fk
12 integer unsigned tinyint smallint bigint decimal numeric
13 char varchar nchar nvarchar binary varbinary blob text ntext
14 date datetime timestamp enum bool boolean
15 inflate_json
16 primary_key
17 rel_one rel_many has_one might_have has_many belongs_to many_to_many
18 ddl_cascade dbic_cascade
19 );
20 3 our %EXPORT_TAGS;
21 3 $EXPORT_TAGS{V0}= \@V0;
22 3 export @V0;
23  
24  
25 5 ▶sub null { is_nullable => 1 }
Subroutine null: called CC=1 SCAR=0.0
Pod documented
26 2 ▶sub auto_inc { is_auto_increment => 1 }
Subroutine auto_inc: called CC=1 SCAR=0.0
Pod documented
27 0 ▶sub fk { is_foreign_key => 1 }
Subroutine fk: not called CC=1 SCAR=6.9
Pod documented
28  
29  
30 6 ▶sub integer { data_type => 'integer', size => (defined $_[0]? $_[0] : 11) }
Subroutine integer: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 0 6 6
31 1 ▶sub unsigned { 'extra.unsigned' => 1 }
Subroutine unsigned: called CC=1 SCAR=0.0
Pod documented
32 1 ▶sub tinyint { data_type => 'tinyint', size => 4 }
Subroutine tinyint: called CC=1 SCAR=0.0
Pod documented
33 1 ▶sub smallint { data_type => 'smallint', size => 6 }
Subroutine smallint: called CC=1 SCAR=0.0
Pod documented
34 1 ▶sub bigint { data_type => 'bigint', size => 22 }
Subroutine bigint: called CC=1 SCAR=0.0
Pod documented
35 1 ▶sub decimal {
Subroutine decimal: called CC=2 SCAR=7.2
Pod documented
36 1 ▶ croak "2 size parameters are required" unless scalar(@_) == 2;
Branch: 1 branch
BranchTrueFalseTotal
unless scalar @_ == 2 0 1 1
37 1 return data_type => 'decimal', size => [ @_ ];
38 }
39 1 ▶sub numeric { &decimal, data_type => 'numeric' }
Subroutine numeric: called CC=1 SCAR=0.0
Pod documented
40  
41  
42 3 ▶sub char { data_type => 'char', size => (defined $_[0]? $_[0] : 1) }
Subroutine char: called CC=2 SCAR=6.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 2 1 3
43 2 ▶sub nchar { data_type => 'nchar', size => (defined $_[0]? $_[0] : 1) }
Subroutine nchar: called CC=2 SCAR=6.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 1 1 2
44 4 ▶sub varchar { data_type => 'varchar', size => (defined $_[0]? $_[0] : 255) }
Subroutine varchar: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 4 0 4
45 1 ▶sub nvarchar { data_type => 'nvarchar', size => (defined $_[0]? $_[0] : 255) }
Subroutine nvarchar: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 1 0 1
46 0 ▶sub binary { data_type => 'binary', size => (defined $_[0]? $_[0] : 255) }
Subroutine binary: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 0 0 0
47 0 ▶sub varbinary { data_type => 'varbinary', size => (defined $_[0]? $_[0] : 255) }
Subroutine varbinary: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 0 0 0
48  
49 0 ▶sub blob { data_type => 'blob', (defined $_[0]? (size => $_[0]) : ()) }
Subroutine blob: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 0 0 0
50 0 ▶sub tinyblob { data_type => 'tinyblob', size => 0xFF }
Subroutine tinyblob: not called CC=1 SCAR=6.9
Pod documented
51 0 ▶sub mediumblob { data_type => 'mediumblob',size => 0xFFFFFF }
Subroutine mediumblob: not called CC=1 SCAR=6.9
Pod documented
52 0 ▶sub longblob { data_type => 'longblob', size => 0xFFFFFFFF }
Subroutine longblob: not called CC=1 SCAR=6.9
Pod documented
53  
54 2 ▶sub text { data_type => 'text', (defined $_[0]? (size => $_[0]) : ()) }
Subroutine text: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 0 2 2
55 0 ▶sub ntext { data_type => 'ntext', size => (defined $_[0]? $_[0] : 0x3FFFFFFF) }
Subroutine ntext: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 0 0 0
56 0 ▶sub tinytext { data_type => 'tinytext', size => 0xFF }
Subroutine tinytext: not called CC=1 SCAR=6.9
Pod documented
57 0 ▶sub mediumtext { data_type => 'mediumtext',size => 0xFFFFFF }
Subroutine mediumtext: not called CC=1 SCAR=6.9
Pod documented
58 0 ▶sub longtext { data_type => 'longtext', size => 0xFFFFFFFF }
Subroutine longtext: not called CC=1 SCAR=6.9
Pod documented
59  
60  
61 0 ▶sub boolean { data_type => 'boolean' }
Subroutine boolean: not called CC=1 SCAR=6.9
Pod documented
62 0 ▶sub bool { data_type => 'boolean' }
Subroutine bool: not called CC=1 SCAR=6.9
Pod documented
63 0 ▶sub bit { data_type => 'bit', size => (defined $_[0]? $_[0] : 1) }
Subroutine bit: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 0 0 0
64  
65  
66 1 ▶sub date { data_type => 'date', (@_? (time_zone => $_[0]) : ()) }
Subroutine date: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 0 1 1
67 2 ▶sub datetime { data_type => 'datetime', (@_? (time_zone => $_[0]) : ()) }
Subroutine datetime: called CC=2 SCAR=7.6
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 2 0 2
68 0 ▶sub timestamp { data_type => 'timestamp',(@_? (time_zone => $_[0]) : ()) }
Subroutine timestamp: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 0 0 0
69  
70  
71 3 1;
72  
73 __END__
« ResultDDL/V1.pm ↑ Summary