[Bast-commits] r7750 - in
DBIx-Class/0.08/branches/sybase_bulkinsert_support/lib/DBIx/Class/Storage:
. DBI
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Wed Sep 30 07:00:59 GMT 2009
Author: caelum
Date: 2009-09-30 07:00:59 +0000 (Wed, 30 Sep 2009)
New Revision: 7750
Modified:
DBIx-Class/0.08/branches/sybase_bulkinsert_support/lib/DBIx/Class/Storage/DBI.pm
DBIx-Class/0.08/branches/sybase_bulkinsert_support/lib/DBIx/Class/Storage/DBI/Sybase.pm
Log:
factor out subclass-specific _execute_array callback
Modified: DBIx-Class/0.08/branches/sybase_bulkinsert_support/lib/DBIx/Class/Storage/DBI/Sybase.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase_bulkinsert_support/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-09-30 06:53:42 UTC (rev 7749)
+++ DBIx-Class/0.08/branches/sybase_bulkinsert_support/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-09-30 07:00:59 UTC (rev 7750)
@@ -664,6 +664,15 @@
}
}
+sub _dbh_execute_array {
+ my ($self, $sth, $tuple_status, $cb) = @_;
+
+ my $rv = $self->next::method($sth, $tuple_status);
+ $cb->() if $cb;
+
+ return $rv;
+}
+
# Make sure blobs are not bound as placeholders, and return any non-empty ones
# as a hash.
sub _remove_blob_cols {
Modified: DBIx-Class/0.08/branches/sybase_bulkinsert_support/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase_bulkinsert_support/lib/DBIx/Class/Storage/DBI.pm 2009-09-30 06:53:42 UTC (rev 7749)
+++ DBIx-Class/0.08/branches/sybase_bulkinsert_support/lib/DBIx/Class/Storage/DBI.pm 2009-09-30 07:00:59 UTC (rev 7750)
@@ -1391,7 +1391,7 @@
}
sub _execute_array {
- my ($self, $source, $sth, $bind, $cols, $data, $after_exec_cb) = @_;
+ my ($self, $source, $sth, $bind, $cols, $data, @extra) = @_;
my $guard = $self->txn_scope_guard unless $self->{transaction_depth} != 0;
@@ -1420,10 +1420,8 @@
$placeholder_index++;
}
- my $rv;
- eval {
- $rv = $sth->execute_array({ArrayTupleStatus => $tuple_status});
- $after_exec_cb->() if $after_exec_cb;
+ my $rv = eval {
+ $self->_dbh_execute_array($sth, $tuple_status, @extra);
};
my $err = $@ || $sth->errstr;
@@ -1451,6 +1449,12 @@
return $rv;
}
+sub _dbh_execute_array {
+ my ($self, $sth, $tuple_status, @extra) = @_;
+
+ return $sth->execute_array({ArrayTupleStatus => $tuple_status});
+}
+
sub _execute_array_empty {
my ($self, $sth, $count) = @_;
More information about the Bast-commits
mailing list