| 1 | package DBIx::Schema::Annotate::Driver::mysql; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use parent 'DBIx::Schema::Annotate::Driver::Base'; | ||
| 5 | use Smart::Args; | ||
| 6 | use DBIx::Inspector; | ||
| 7 | |||
| 8 | sub table_ddl { | ||
| 9 | args( | ||
| 10 | my $self, | ||
| 11 | my $table_name => 'Str', | ||
| 12 | ); | ||
| 13 | |||
| 14 | my $inspector = DBIx::Inspector->new(dbh => $self->{dbh}); | ||
| 15 | $inspector->table($table_name) or die 'unknown table name: ', $table_name; | ||
| 16 | |||
| 17 | my $row = $self->{dbh}->selectrow_hashref(qq!SHOW CREATE TABLE $table_name!); | ||
| 18 | return $row->{'Create Table'}; | ||
| 19 | } | ||
| 20 | |||
| 21 | |||
| 22 | 1; | ||
| 23 |