| 1 | package DBIx::Skinny::Schema::Loader::DBI::SQLite; | ||||||||||
| 2 | 12 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 12 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 12 | ▶ | use base qw/DBIx::Skinny::Schema::Loader::DBI/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 12 | ▶ | sub tables { | ||||||||
|
Subroutine
tables: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||
| 8 | 12 | my $self = shift; | |||||||||
| 9 | 12 | my $sth = $self->{ dbh }->prepare("SELECT * FROM sqlite_master"); | |||||||||
| 10 | 12 | $sth->execute; | |||||||||
| 11 | 12 | my @tables; | |||||||||
| 12 | 12 | ▶ | while ( my $row = $sth->fetchrow_hashref ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 108 | ▶ | next unless lc( $row->{type} ) eq 'table'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 84 | ▶ | next if $row->{tbl_name} =~ /^sqlite_/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 72 | push @tables, $row->{tbl_name}; | |||||||||
| 16 | } | ||||||||||
| 17 | 12 | $sth->finish; | |||||||||
| 18 | 12 | my @sorted = sort @tables; | |||||||||
| 19 | 12 | return \@sorted; | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 12 | 1; | |||||||||