blib/lib/blx/xsdsql/generator/sql/generic/handle/drop_table.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 44 CC 3 SCAR 13.3
CC
3
Cov
0%
get_binding_objects
6.0
table_header
6.0
_get_drop_prefix
2.0
CRAP 3.8
1 package blx::xsdsql::generator::sql::generic::handle::drop_table;
2 use strict; # use strict is for PBP
3 use Filter::Include;
4 include blx::xsdsql::include;
5 #line 6
6 use base(qw(blx::xsdsql::generator::sql::generic::handle));
7  
8 sub _get_drop_prefix {
9 my ($self,%params)=@_;
10 return "drop table";
11 }
12  
13 sub _get_drop_suffix {
14 my ($self,%params)=@_;
15 return "";
16 }
17  
18 sub get_binding_objects {
19 my ($self,$schema,%params)=@_;
20 my $root_table=$schema->get_root_table;
21 return wantarray ? ( $root_table ) : [ $root_table ];
22 }
23  
24 sub table_header {
25 my ($self,$table,%params)=@_;
26 my $path=$table->get_attrs_value(qw(PATH));
27 my $comm=defined $path && !$params{NO_EMIT_COMMENTS} ? $table->comment('PATH: '.$path) : '';
28 $self->{STREAMER}->put_line($self->_get_drop_prefix(%params),' ',$table->get_sql_name,' ',$self->_get_drop_suffix(%params),' ',$comm,' ',$table->command_terminator);
29 return $self;
30 }
31  
32 1;
33  
34 __END__