« blib/lib/blx/xsdsql/generator/sql/generic/handle/drop_view.pm
↑ Summary
blib/lib/blx/xsdsql/xsd_parser/node/restriction.pm »
| 1 | package blx::xsdsql::schema_repository::sql::DBM::column; | ||
| 2 | use strict; # use strict is for PBP | ||
| 3 | use Filter::Include; | ||
| 4 | include blx::xsdsql::include; | ||
| 5 | #line 6 | ||
| 6 | |||
| 7 | use base qw(blx::xsdsql::schema_repository::sql::DBM::catalog blx::xsdsql::schema_repository::sql::generic::column); | ||
| 8 | use blx::xsdsql::ut::ut qw(nvl); | ||
| 9 | |||
| 10 | |||
| 11 | sub new { | ||
| 12 | my ($class,%params)=@_; | ||
| 13 | return $class->blx::xsdsql::schema_repository::sql::generic::column::_new(%params); | ||
| 14 | } | ||
| 15 | |||
| 16 | |||
| 17 | sub get_dictionary_data { | ||
| 18 | my ($self,$dictionary_type,%params)=@_; | ||
| 19 | my %data=$self->blx::xsdsql::schema_repository::sql::generic::column::get_dictionary_data($dictionary_type,%params); | ||
| 20 | $data{pk_autosequence}=$self->get_attrs_value(qw(PK_AUTOSEQUENCE)); | ||
| 21 | return wantarray ? %data : \%data; | ||
| 22 | } | ||
| 23 | |||
| 24 | sub get_attrs_key { | ||
| 25 | my ($self,%params)=@_; | ||
| 26 | my @attrs_key=$self->blx::xsdsql::schema_repository::sql::generic::column::get_attrs_key; | ||
| 27 | push @attrs_key,'PK_AUTOSEQUENCE'; | ||
| 28 | return wantarray ? @attrs_key : \@attrs_key; | ||
| 29 | } | ||
| 30 | |||
| 31 | sub factory_from_dictionary_data { | ||
| 32 | my ($data,%params)=@_; | ||
| 33 | affirm { ref($data) eq 'ARRAY' } "the 1^ param must be array"; | ||
| 34 | my $pk_autosequence=pop @$data; | ||
| 35 | my $c=blx::xsdsql::schema_repository::sql::generic::column::factory_from_dictionary_data($data,%params); | ||
| 36 | $c->{PK_AUTOSEQUENCE}=$pk_autosequence; | ||
| 37 | return $c; | ||
| 38 | } | ||
| 39 | |||
| 40 | |||
| 41 | 1; | ||
| 42 | |||
| 43 | |||
| 44 | __END__ |