blib/lib/Oryx/DBI/Util/Pg.pm untested

filter: Statementstmt 0.0% 0 / 7 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 10 CC 1 SCAR 6.9
CC
1
Cov
0%
lastval
2.0
BEGIN
2.0
CRAP 2.0
1 package Oryx::DBI::Util::Pg;
2  
3 use base qw(Oryx::DBI::Util);
4  
5 our %SQL_TYPES = (
6 'Oid' => 'serial PRIMARY KEY',
7 'Integer' => 'integer',
8 'String' => 'varchar',
9 'Text' => 'text',
10 'Binary' => 'bytea',
11 'Float' => 'numeric',
12 'Boolean' => 'integer',
13 'DateTime' => 'timestamp',
14 );
15  
16 sub lastval {
17 my ($self, $dbh, $table) = @_;
18 return $dbh->last_insert_id('%', 'public', $table, 'id');
19 }
20  
21 1;
22 __END__