File Coverage

lib/Parse/Dia/SQL/Output/MySQL/MyISAM.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Parse::Dia::SQL::Output::MySQL::MyISAM;
2              
3             # $Id: MyISAM.pm,v 1.4 2009/03/02 13:41:39 aff Exp $
4              
5             =pod
6              
7             =head1 NAME
8              
9             Parse::Dia::SQL::Output::MySQL::MyISAM - Create SQL for MySQL MyISAM.
10              
11             =head1 DESCRIPTION
12              
13             Note that MySQL has support for difference storage engines. Each
14             storage engine has its' own properties and the respective SQL differs.
15              
16             =head1 SEE ALSO
17              
18             Parse::Dia::SQL::Output
19             Parse::Dia::SQL::Output::MySQL
20             Parse::Dia::SQL::Output::MySQL::InnoDB
21              
22             =cut
23              
24 2     2   1805 use warnings;
  2         2  
  2         48  
25 2     2   6 use strict;
  2         2  
  2         25  
26              
27 2     2   6 use Data::Dumper;
  2         2  
  2         68  
28 2     2   8 use File::Spec::Functions qw(catfile);
  2         1  
  2         60  
29              
30 2     2   6 use lib q{lib};
  2         2  
  2         9  
31 2     2   127 use base q{Parse::Dia::SQL::Output::MySQL}; # extends
  2         1  
  2         141  
32              
33             require Parse::Dia::SQL::Logger;
34             require Parse::Dia::SQL::Const;
35              
36             =head2 new
37              
38             The constructor.
39              
40             =cut
41              
42             sub new {
43             my ( $class, %param ) = @_;
44             my $self = {};
45              
46             $param{db} = q{mysql-myisam};
47             $param{table_postfix_options} = ['ENGINE=MyISAM','DEFAULT CHARSET=latin1'],
48             $self = $class->SUPER::new(%param);
49              
50             bless( $self, $class );
51             return $self;
52             }
53              
54             =head2 get_view_create
55              
56             Views are not supported on MyISAM. Warn and return undef.
57              
58             =cut
59              
60             sub get_view_create {
61             my $self = shift;
62             $self->{log}->error(q{Views are not supported on MyISAM - Views not created.});
63             return;
64             }
65              
66             =head2 get_view_drop
67              
68             Views are not supported on MyISAM. Warn and return undef.
69              
70             =cut
71              
72             sub get_view_drop {
73             my $self = shift;
74             $self->{log}->error(q{Views are not supported on MyISAM - Views not dropped.});
75             return;
76             }
77              
78             1;
79              
80             __END__