$weak_self->throw_exception("DBI Exception: $_[0]");
}
else {
+ # the handler may be invoked by something totally out of
+ # the scope of DBIC
croak ("DBI Exception: $_[0]");
}
};
my %colvalues;
my $table = $source->from;
@colvalues{@$cols} = (0..$#$cols);
-
- my ($sql, $bind) = $self->_prep_for_execute (
- 'insert', undef, $source, [\%colvalues]
- );
- my @bind = @$bind
- or croak 'Cannot insert_bulk without support for placeholders';
+ my ($sql, @bind) = $self->sql_maker->insert($table, \%colvalues);
$self->_query_start( $sql, @bind );
my $sth = $self->sth($sql);
$placeholder_index++;
}
my $rv = eval { $sth->execute_array({ArrayTupleStatus => $tuple_status}) };
- $sth->finish;
if (my $err = $@) {
my $i = 0;
++$i while $i <= $#$tuple_status && !ref $tuple_status->[$i];