[Dbix-class] FW: DBIC and Informix

Matt S Trout dbix-class at trout.me.uk
Wed Sep 5 17:37:31 GMT 2007

On Wed, Sep 05, 2007 at 12:49:17PM +1200, Robert Carew wrote:
> Hi
> Thanks Matt, almost right. The following works:
> __PACKAGE__->mk_group_accessors('simple' => '__last_insert_id');
> sub _dbh_execute {
>   my ($self, $type, @args) = @_;
>   my ($rv, $sth, @rest) = $self->next::method($type, @args);
>   if ($args[0] eq 'insert') {
>     $self->__last_insert_id($sth->{ix_sqlerrd}[1]);
>   }
>   return (wantarray ? ($rv, $sth, @rest) : $rv);
> }
> sub last_insert_id {
>   shift->__last_insert_id;
> }
> using $args[0] rather than $type, $type is DBI::db hash.
> I now need to try and understand what exactly is happening here.

Damnit, $type is shifted over one in the _dbh_execute as opposed to _execute,
my mistake.

Chuck me an htpasswd line and I'll get you a branch so you can commit this
and update as required; we're here for any questions but as the guy with the
Informix system I'd rather you take point on the commits if you're willing;
once you're happy it's working for you we'll get it into a release.

Sound good?

      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/                    http://www.shadowcat.co.uk/ 

More information about the DBIx-Class mailing list