| 1 | package DBIx::Skinny::Schema::Loader::DBI::Pg; | ||||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | |||||||||||||
| 5 | 2 | ▶ | use base qw/DBIx::Skinny::Schema::Loader::DBI/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 0 | ▶ | sub tables { | ||||||||||
|
Subroutine
tables: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||
| 8 | 0 | my $self = shift; | |||||||||||
| 9 | 0 | ▶ | my $schema = $self->{ schema } || 'public'; | ||||||||||
|
Condition0%0/2
$self->{'schema'} || 'public'
MC/DC0%0/1
$self->{'schema'} || 'public'
$self->{'schema'}
Truth table0%0/2
A
A= $self->{'schema'}
| |||||||||||||
| 10 | 0 | my $sth = $self->{ dbh }->table_info('', $schema, undef, undef); | |||||||||||
| 11 | 0 | my @tables; | |||||||||||
| 12 | 0 | for my $rel (@{ $sth->fetchall_arrayref({}) }) { | |||||||||||
| 13 | 0 | push @tables, $rel->{TABLE_NAME}; | |||||||||||
| 14 | } | ||||||||||||
| 15 | 0 | return \@tables; | |||||||||||
| 16 | } | ||||||||||||
| 17 | |||||||||||||
| 18 | 0 | ▶ | sub table_columns { | ||||||||||
|
Subroutine
table_columns: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||
| 19 | 0 | my ($self, $table) = @_; | |||||||||||
| 20 | 0 | ▶ | my $schema = $self->{ schema } || 'public'; | ||||||||||
|
Condition0%0/2
$self->{'schema'} || 'public'
MC/DC0%0/1
$self->{'schema'} || 'public'
$self->{'schema'}
Truth table0%0/2
A
A= $self->{'schema'}
| |||||||||||||
| 21 | 0 | my $sth = $self->{ dbh }->prepare("select * from $schema.$table where 1 = 0"); | |||||||||||
| 22 | 0 | $sth->execute; | |||||||||||
| 23 | 0 | my $retval = \@{$sth->{NAME_lc}}; | |||||||||||
| 24 | 0 | $sth->finish; | |||||||||||
| 25 | 0 | return $retval; | |||||||||||
| 26 | } | ||||||||||||
| 27 | |||||||||||||
| 28 | 2 | 1; | |||||||||||