line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::ThinSQL::Drop; |
2
|
2
|
|
|
2
|
|
708
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
43
|
|
3
|
2
|
|
|
2
|
|
5
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
42
|
|
4
|
2
|
|
|
2
|
|
819
|
use File::ShareDir qw/dist_dir/; |
|
2
|
|
|
|
|
8723
|
|
|
2
|
|
|
|
|
103
|
|
5
|
2
|
|
|
2
|
|
665
|
use Path::Tiny; |
|
2
|
|
|
|
|
7630
|
|
|
2
|
|
|
|
|
80
|
|
6
|
2
|
|
|
2
|
|
370
|
use DBIx::ThinSQL::Deploy; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
470
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.0.45_2'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _doit { |
11
|
29
|
|
|
29
|
|
53
|
my $self = shift; |
12
|
29
|
|
|
|
|
42
|
my $type = shift; |
13
|
29
|
|
|
|
|
265
|
my $driver = $self->{Driver}->{Name}; |
14
|
29
|
|
|
|
|
161
|
my $file = $self->share_dir->child( 'Drop', $driver, $type . '.sql' ); |
15
|
|
|
|
|
|
|
|
16
|
29
|
100
|
|
|
|
3932
|
return $self->run_file($file) if -f $file; |
17
|
1
|
|
|
|
|
202
|
Carp::croak "Drop $type for driver $driver is unsupported."; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub DBIx::ThinSQL::db::drop_indexes { |
21
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
22
|
0
|
|
|
|
|
0
|
return _doit( $self, 'indexes' ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub DBIx::ThinSQL::db::drop_functions { |
26
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
27
|
0
|
|
|
|
|
0
|
return _doit( $self, 'functions' ); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub DBIx::ThinSQL::db::drop_languages { |
31
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
32
|
0
|
|
|
|
|
0
|
return _doit( $self, 'languages' ); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub DBIx::ThinSQL::db::drop_sequences { |
36
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
37
|
0
|
|
|
|
|
0
|
return _doit( $self, 'sequences' ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub DBIx::ThinSQL::db::drop_tables { |
41
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
42
|
0
|
|
|
|
|
0
|
return _doit( $self, 'tables' ); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub DBIx::ThinSQL::db::drop_triggers { |
46
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
47
|
0
|
|
|
|
|
0
|
return _doit( $self, 'triggers' ); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub DBIx::ThinSQL::db::drop_views { |
51
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
52
|
0
|
|
|
|
|
0
|
return _doit( $self, 'views' ); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub DBIx::ThinSQL::db::drop_everything { |
56
|
5
|
|
|
5
|
|
52580
|
my $self = shift; |
57
|
5
|
|
|
|
|
25
|
return _doit( $self, 'indexes' ) + |
58
|
|
|
|
|
|
|
_doit( $self, 'functions' ) + |
59
|
|
|
|
|
|
|
_doit( $self, 'languages' ) + |
60
|
|
|
|
|
|
|
_doit( $self, 'sequences' ) + |
61
|
|
|
|
|
|
|
_doit( $self, 'tables' ) + |
62
|
|
|
|
|
|
|
_doit( $self, 'triggers' ) + |
63
|
|
|
|
|
|
|
_doit( $self, 'views' ); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |