X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=26effd672b3282a18dfa58d78f54e0db09778373;hb=48f82d6d7a9ea922f88dd2bd9db5bf4e63a00dd6;hp=27d4e66a6344e7a3ac6f4e843bf346e5cd1f9aa6;hpb=db4b5f116bc5a3813d83a2880a55cd5fe399e702;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 27d4e66..26effd6 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -856,19 +856,22 @@ sub _execute { foreach my $bound (@bind) { my $attributes = {}; - my($column_name, $data) = @$bound; + my($column_name, @data) = @$bound; if( $bind_attributes ) { $attributes = $bind_attributes->{$column_name} if defined $bind_attributes->{$column_name}; - } + } - $data = ref $data ? ''.$data : $data; # stringify args + foreach my $data (@data) + { + $data = ref $data ? ''.$data : $data; # stringify args - $sth->bind_param($placeholder_index, $data, $attributes); - $placeholder_index++; + $sth->bind_param($placeholder_index, $data, $attributes); + $placeholder_index++; + } } - $sth->execute; + $sth->execute(); }; if ($@ || !$rv) { @@ -958,7 +961,6 @@ sub insert_bulk { foreach my $column ($source->columns) { my $data_type = $source->column_info($column)->{data_type} || ''; - $bind_attributes->{$column} = $self->bind_attribute_by_data_type($data_type) if $data_type; }