Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
0c9ffbd8
Commit
0c9ffbd8
authored
Oct 19, 2010
by
Andy Yates
Browse files
Need to give this the option to pass in a callback so you can return a 1D array of anything
parent
45e2cbc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
modules/Bio/EnsEMBL/Utils/SqlHelper.pm
modules/Bio/EnsEMBL/Utils/SqlHelper.pm
+3
-2
No files found.
modules/Bio/EnsEMBL/Utils/SqlHelper.pm
View file @
0c9ffbd8
...
...
@@ -257,6 +257,7 @@ sub execute {
Arg [SQL] : SQL to execute
Arg [PARAMS] : The binding parameters to the SQL statement
Arg [CALLBACK] : Allows you to give a callback to do the mapping with
Returntype : 1D array of data points
Exceptions : If errors occur in the execution of the SQL
Status : Stable
...
...
@@ -274,10 +275,10 @@ by the given SQL statement.
sub
execute_simple
{
my
(
$self
,
@args
)
=
@_
;
my
(
$sql
,
$params
)
=
rearrange
([
qw(sql params)
],
@args
);
my
(
$sql
,
$params
,
$callback
)
=
rearrange
([
qw(sql params
callback
)
],
@args
);
my
$has_return
=
1
;
my
$use_hashrefs
=
0
;
my
$callback
=
$self
->
_mappers
()
->
{
first_element
};
$callback
||
=
$self
->
_mappers
()
->
{
first_element
};
return
$self
->
_execute
(
$sql
,
$callback
,
$has_return
,
$use_hashrefs
,
$params
);
}
...
...
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