__PACKAGE__->sql_maker_class('DBIx::Class::SQLMaker::MySQL');
__PACKAGE__->sql_limit_dialect ('LimitXY');
+__PACKAGE__->sql_quote_char ('`');
sub with_deferred_fk_checks {
my ($self, $sub) = @_;
my $maker = $self->next::method (@_);
# mysql 3 does not understand a bare JOIN
- my $mysql_ver = $self->_get_dbh->get_info(18);
+ my $mysql_ver = $self->_dbh_get_info(18);
$maker->{_default_jointype} = 'INNER' if $mysql_ver =~ /^3/;
}
return shift->_per_row_update_delete (@_);
}
+my $INSERT_BULK_SIZE = 80;
+sub _insert_bulk {
+ my ($self, $source, $cols, $colvalues, $data) = @_;
+
+ my $bind_attrs = $self->source_bind_attributes($source);
+
+ # Organize this way to make context sensitivity easier to code up.
+ while ( @$data > $INSERT_BULK_SIZE ) {
+ my @this_data = splice @$data, 0, $INSERT_BULK_SIZE;
+ $self->_execute(
+ 'insert_bulk' => [], $source, $bind_attrs, \@this_data, $cols,
+ );
+ }
+
+ # Don't put this in the while-loop above.
+ return $self->_execute(
+ 'insert_bulk' => [], $source, $bind_attrs, $data, $cols,
+ );
+}
+
1;
=head1 NAME