1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
package Parse::Dia::SQL::Output::Sybase;
# $Id: Sybase.pm,v 1.2 2009/03/02 13:41:39 aff Exp $
=pod
=head1 NAME
Parse::Dia::SQL::Output::Sybase - Create SQL for Sybase.
=head1 SEE ALSO
Parse::Dia::SQL::Output
=cut
use warnings;
use strict;
use Data::Dumper;
use File::Spec::Functions qw(catfile);
use lib q{lib};
use base q{Parse::Dia::SQL::Output}; # extends
require Parse::Dia::SQL::Logger;
require Parse::Dia::SQL::Const;
=head2 new
The constructor. Arguments:
=cut
sub new {
my ( $class, %param ) = @_;
my $self = {};
# Set defaults for sybase
$param{db} = q{sybase};
$param{object_name_max_length} = $param{object_name_max_length} || 30;
$param{end_of_statement} = $param{end_of_statement} || "\ngo";
$self = $class->SUPER::new(%param);
bless( $self, $class );
$self->{log}->warn(qq{Using object_name_max_length }. $param{object_name_max_length});
return $self;
}
=head2 _get_drop_index_sql
create drop index for index on table with given name.
=cut
sub _get_drop_index_sql {
my ( $self, $tablename, $indexname ) = @_;
return qq{drop index $tablename.$indexname}
. $self->{end_of_statement}
. $self->{newline};
}
1;
__END__
|