| Oryx documentation | Contained in the Oryx distribution. |
Oryx::DBI::Util::Pg - Oryx DBI utilities for PostgreSQL connections
This provides an Oryx DBI utility class for use with DBD::Pg.
Richard Hundt <richard NO SPAM AT protea-systems.com>
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
Copyright (c) 2005 Richard Hundt.
This library is free software and may be used under the same terms as Perl itself.
| Oryx documentation | Contained in the Oryx distribution. |
package Oryx::DBI::Util::Pg; use base qw(Oryx::DBI::Util); our %SQL_TYPES = ( 'Oid' => 'serial PRIMARY KEY', 'Integer' => 'integer', 'String' => 'varchar', 'Text' => 'text', 'Binary' => 'bytea', 'Float' => 'numeric', 'Boolean' => 'integer', 'DateTime' => 'timestamp', ); sub lastval { my ($self, $dbh, $table) = @_; return $dbh->last_insert_id('%', 'public', $table, 'id'); } 1; __END__