blib/lib/blx/xsdsql/generator/sql/DBM/handle/create_table.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 37 CC 3 SCAR 18.4
CC
3
Cov
0%
table_header
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 6.3
1 package blx::xsdsql::generator::sql::DBM::handle::create_table;
2 use strict; # use strict is for PBP
3 use Filter::Include;
4 include blx::xsdsql::include;
5 #line 6
6  
7 use blx::xsdsql::ut::ut qw(nvl);
8  
9 use base qw(blx::xsdsql::generator::sql::generic::handle::create_table);
10  
11  
12 sub table_header {
13 my ($self,$table,%params)=@_;
14 unless (defined $table->get_attrs_value(qw(_PK_DUMMY))) {
15 my @pk_cols=$table->get_pk_columns;
16 if (scalar(@pk_cols) > 1) {
17 affirm { defined $params{EXTRA_TABLES} } "param EXTRA_TABLES not set";
18 my $extra_tables=$params{EXTRA_TABLES};
19 my @cols=$table->reset_columns;
20 my $pk_col=$extra_tables->factory_pk_col;
21 $table->add_columns($pk_col,@cols);
22 $table->set_attrs_value(_PK_DUMMY => 1);
23 }
24 else {
25 $table->set_attrs_value(_PK_DUMMY => 0);
26 }
27 }
28 return $self->SUPER::table_header($table,%params);
29 }
30  
31  
32 1;
33  
34 __END__