Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
71033bec
Commit
71033bec
authored
Dec 22, 2014
by
Matthieu Muffato
Browse files
Backported the recent changes from Ensembl's DBConnection
- use placeholders in "do" commands
parent
533187fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
modules/Bio/EnsEMBL/Hive/DBSQL/CoreDBConnection.pm
modules/Bio/EnsEMBL/Hive/DBSQL/CoreDBConnection.pm
+2
-2
No files found.
modules/Bio/EnsEMBL/Hive/DBSQL/CoreDBConnection.pm
View file @
71033bec
...
...
@@ -808,7 +808,7 @@ sub reconnect {
=cut
sub
do
{
my
(
$self
,
$string
)
=
@_
;
my
(
$self
,
$string
,
$attr
,
@bind_values
)
=
@_
;
if
(
!
$string
)
{
throw
("
Attempting to do an empty SQL query.
");
...
...
@@ -819,7 +819,7 @@ sub do {
my
$do_result
=
$self
->
work_with_db_handle
(
sub
{
my
(
$dbh
)
=
@_
;
my
$result
=
eval
{
$dbh
->
do
(
$string
)
};
my
$result
=
eval
{
$dbh
->
do
(
$string
,
$attr
,
@bind_values
)
};
$error
=
$@
if
$@
;
return
$result
;
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment