[CDBI] problem with loadinng data in a db2 database using class-dbi

Matt S Trout dbix-class at trout.me.uk
Tue Nov 1 17:00:24 GMT 2005


On Mon, Oct 31, 2005 at 06:21:50PM -0700, noumene at cpsc.ucalgary.ca wrote:
> Hi,
> 
>  I am trying to load data in my db2 database using class-dbi in a
> perl script.
> I am blocked on the dbi set_up_table function called in my script:
> Chado::Tableinfo->set_up_table('tableinfo');

Why not simply define your columns etc. the normal way?

The set_up_table class methods defined by the db-specific subclasses are
a handy shortcut sometimes, but they are only a shortcut and they don't
always work.

package Foo;

__PACKAGE__->table('foo');
__PACKAGE__->columns(All => qw/list of column names/);

is the standard Class::DBI way to do it and rather more reliable.

-- 
     Matt S Trout       Specialists in Perl consulting, web development, and
  Technical Director    UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +




More information about the ClassDBI mailing list