1 package DBIx::Class::Storage::DBI::InterBase;
3 # mostly stolen from DBIx::Class::Storage::DBI::MSSQL
8 use base qw/DBIx::Class::Storage::DBI::AmbiguousGlob DBIx::Class::Storage::DBI/;
13 __PACKAGE__->mk_group_accessors(simple => qw/
19 my ($source, $cols, $data) = @_;
21 my $is_identity_insert = (List::Util::first
22 { $source->column_info ($_)->{is_auto_increment} }
28 $self->next::method(@_);
32 sub _prep_for_execute {
34 my ($op, $extra_bind, $ident, $args) = @_;
36 my ($sql, $bind) = $self->next::method (@_);
38 if ($op eq 'insert') {
39 $sql .= 'RETURNING "Id"';
50 my ($rv, $sth, @bind) = $self->dbh_do($self->can('_dbh_execute'), @_);
52 if ($op eq 'insert') {
54 # this should bring back the result of SELECT SCOPE_IDENTITY() we tacked
55 # on in _prep_for_execute above
57 my ($identity) = eval { $sth->fetchrow_array };
59 $self->_identity($identity);
63 return wantarray ? ($rv, $sth, @bind) : $rv;
66 sub last_insert_id { shift->_identity }