X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FInformix.pm;h=ca6bf55e4fe300a19e65fd5cf6c503684c052d73;hb=5b3090637dc0ea8949627267561820b43ff8e1cb;hp=90587d09c352d66f528f72eca9d0f7af971a3bc0;hpb=2b8cc2f27d0dc881059e55dd6462bb28b7b8e414;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Informix.pm b/lib/DBIx/Class/Storage/DBI/Informix.pm index 90587d0..ca6bf55 100644 --- a/lib/DBIx/Class/Storage/DBI/Informix.pm +++ b/lib/DBIx/Class/Storage/DBI/Informix.pm @@ -11,6 +11,10 @@ use namespace::clean; __PACKAGE__->sql_limit_dialect ('SkipFirst'); __PACKAGE__->sql_quote_char ('"'); +__PACKAGE__->datetime_parser_type ( + 'DBIx::Class::Storage::DBI::Informix::DateTime::Format' +); + __PACKAGE__->mk_group_accessors('simple' => '__last_insert_id'); @@ -28,11 +32,11 @@ This class implements storage-specific support for the Informix RDBMS sub _execute { my $self = shift; - my ($op) = @_; my ($rv, $sth, @rest) = $self->next::method(@_); - if ($op eq 'insert') { - $self->__last_insert_id($sth->{ix_sqlerrd}[1]); - } + + $self->__last_insert_id($sth->{ix_sqlerrd}[1]) + if $self->_perform_autoinc_retrieval; + return (wantarray ? ($rv, $sth, @rest) : $rv); } @@ -40,19 +44,19 @@ sub last_insert_id { shift->__last_insert_id; } -sub _svp_begin { +sub _exec_svp_begin { my ($self, $name) = @_; - $self->_get_dbh->do("SAVEPOINT $name"); + $self->_dbh->do("SAVEPOINT $name"); } # can't release savepoints -sub _svp_release { 1 } +sub _exec_svp_release { 1 } -sub _svp_rollback { +sub _exec_svp_rollback { my ($self, $name) = @_; - $self->_get_dbh->do("ROLLBACK TO SAVEPOINT $name") + $self->_dbh->do("ROLLBACK TO SAVEPOINT $name") } sub with_deferred_fk_checks { @@ -117,10 +121,6 @@ sub connect_call_datetime_setup { $ENV{GL_DATETIME} = "%Y-%m-%d %H:%M:%S%F5"; } -sub datetime_parser_type { - 'DBIx::Class::Storage::DBI::Informix::DateTime::Format' -} - package # hide from PAUSE DBIx::Class::Storage::DBI::Informix::DateTime::Format;