File: Sas.pm

package info (click to toggle)
libparse-dia-sql-perl 0.31-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 924 kB
  • sloc: perl: 3,865; makefile: 2
file content (68 lines) | stat: -rw-r--r-- 1,013 bytes parent folder | download | duplicates (2)
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
package Parse::Dia::SQL::Output::Sas;

# $Id: Sas.pm,v 1.3 2009/03/02 13:41:39 aff Exp $

=pod

=head1 NAME 

Parse::Dia::SQL::Output::Sas - Create SQL for Sas.

=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 sas
  $param{db} = q{sas}; 
  $param{object_name_max_length} = $param{object_name_max_length} || 32;

  $self = $class->SUPER::new(%param);
  bless( $self, $class );

  return $self;
}

=head2 _get_drop_schema_sql

Sas do not support keyword 'if exists' in 'drop table' statement

=cut

sub _get_drop_schema_sql {
  my ($self, $tablename) = @_;

  return
      qq{drop table $tablename}
    . $self->{end_of_statement}
    . $self->{newline};
}


1;

__END__