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

filter: Statementstmt 0.0% 0 / 27 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 43 CC 5 SCAR 27.7
CC
5
Cov
0%
table_header
30.0
_get_create_prefix
2.0
BEGIN
2.0
CRAP 16.0
1 package blx::xsdsql::generator::sql::generic::handle::create_extra_tables;
2 use strict; # use strict is for PBP
3 use Filter::Include;
4 include blx::xsdsql::include;
5 #line 6
6 use blx::xsdsql::schema_repository::sql::generic::column;
7 use base(qw(blx::xsdsql::generator::sql::generic::handle));
8  
9 sub _get_create_prefix {
10 my ($self,%params)=@_;
11 return "create table";
12 }
13  
14 sub table_header {
15 my ($self,$dic,%params)=@_;
16 my $comment=$params{NO_EMIT_COMMENTS} ? '' : $dic->get_comment;
17 $self->{STREAMER}->put_line($self->_get_create_prefix,' ',$dic->get_sql_name,"( ",$comment);
18 for my $col($dic->get_columns) {
19 my $first_column=$col->get_attrs_value(qw(COLUMN_SEQUENCE)) == 0 ? 1 : 0;
20 my $comment=$params{NO_EMIT_COMMENTS} ? '' : $col->get_comment;
21 $self->{STREAMER}->put_line("\t".($first_column ? '' : ',').$col->get_sql_name."\t".$col->get_sql_type."\t".$comment);
22 }
23 $self->{STREAMER}->put_line(')',$dic->command_terminator);
24 $self->{STREAMER}->put_line;
25 $self->_create_indexes($dic,%params);
26 return $self;
27 }
28  
29  
30  
31 1;
32  
33 __END__