Wrapper/Postgres.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 28 CC 2 SCAR 12.8
CC
2
Cov
0%
GetTableNames
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 package Database::Wrapper::Postgres;
2
3 use strict;
4 use lib qw(../..);
5 use base qw(Database::Wrapper);
6
7 our $VERSION = "1.04";
8 # $Id: Postgres.pm,v 1.3 2005/11/26 00:37:34 incorpoc Exp $
9
10 =pod
11
12 Filter out all but tables
13
14 =cut
15
16 sub GetTableNames($)
17 {
18 my ($self) = (shift);
19
20 my $raAllSchemas = [$self->{dbh}->tables('', '', '', 'TABLE')];
21 ## If it starts with 'public.', we want it
22 my $raTables = [grep {$_ = (/^public\./o)? $' : undef} @$raAllSchemas];
23 # Remove quotes
24 $raTables = [grep {s/\"//go; 1;} @$raTables];
25
26 return $raTables;
27 }
28
29 1;
30
31 __END__