Commit 71033bec authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

Backported the recent changes from Ensembl's DBConnection

- use placeholders in "do" commands
parent 533187fa
...@@ -808,7 +808,7 @@ sub reconnect { ...@@ -808,7 +808,7 @@ sub reconnect {
=cut =cut
sub do { sub do {
my ($self,$string) = @_; my ($self,$string, $attr, @bind_values) = @_;
if( ! $string ) { if( ! $string ) {
throw("Attempting to do an empty SQL query."); throw("Attempting to do an empty SQL query.");
...@@ -819,7 +819,7 @@ sub do { ...@@ -819,7 +819,7 @@ sub do {
my $do_result = $self->work_with_db_handle(sub { my $do_result = $self->work_with_db_handle(sub {
my ($dbh) = @_; my ($dbh) = @_;
my $result = eval { $dbh->do($string) }; my $result = eval { $dbh->do($string, $attr, @bind_values) };
$error = $@ if $@; $error = $@ if $@;
return $result; return $result;
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment