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