Name : perl-Class-DBI-Pg
| |
Version : 0.80.0
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp156.1.1
| Date : 2024-07-19 23:57:06
|
Group : Unspecified
| Source RPM : perl-Class-DBI-Pg-0.80.0-lp156.1.1.src.rpm
|
Size : 0.01 MB
| |
Packager : https://www_suse_com/
| |
Summary : Class::DBI extension for Postgres
|
Description :
Class::DBI::Pg automate the setup of Class::DBI columns and primary key for Postgres.
select Postgres system catalog and find out all columns, primary key and SERIAL type column.
create table.
CREATE TABLE cd ( id SERIAL NOT NULL PRIMARY KEY, title TEXT, artist TEXT, release_date DATE );
setup your class.
package CD; use strict; use base qw(Class::DBI::Pg);
__PACKAGE__->set_db(Main => \'dbi:Pg:dbname=db\', \'user\', \'password\'); __PACKAGE__->set_up_table(\'cd\');
This is almost the same as the following way.
package CD;
use strict; use base qw(Class::DBI);
__PACKAGE__->set_db(Main => \'dbi:Pg:dbname=db\', \'user\', \'password\'); __PACKAGE__->table(\'cd\'); __PACKAGE__->columns(Primary => \'id\'); __PACKAGE__->columns(All => qw(id title artist release_date)); __PACKAGE__->sequence(\'cd_id_seq\');
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/15.6/noarch |