« blib/lib/blx/xsdsql/xsd_parser/node/simpleType.pm
↑ Summary
blib/lib/blx/xsdsql/generator/sql/generic/handle/drop_view.pm »
| 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__ |