Help for this page

Select Code to Download


  1. or download this
    use lib 'lib';
    use Party::M::CDBI::Declaration;
    
    my $a = Party::M::CDBI::Declaration->create({freetext => 'aaasdds'});
    
  2. or download this
    Can't insert new Party::M::CDBI::Declaration: DBD::Pg::st execute fail
    +ed: ERROR:  null value in column "id" violates not-null constraint
     [for Statement "INSERT INTO declaration (freetext, id)
    VALUES (?, ?)
    " with ParamValues: ] at /usr/local/share/perl/5.8.4/DBIx/ContextualFe
    +tch.pm line 51.
     at a.pl line 6
    
  3. or download this
    INSERT INTO declaration (freetext) VALUES ('aaasdds');
    
  4. or download this
    package Party::M::CDBI;
    
    ...
    __PACKAGE__->columns(All => qw/id usr place freetext cdate/);
    __PACKAGE__->has_a(usr => 'Party::M::CDBI::Usr');
    
  5. or download this
    create table declaration(
    id serial primary key,
    ...
    freetext text,
    cdate timestamp default CURRENT_TIMESTAMP
    );