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
fdfac377
Commit
fdfac377
authored
Feb 23, 2006
by
Daniel Rios
Browse files
modified LIMIT to use a function from DBConnection
parent
fc198f11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
19 deletions
+17
-19
modules/Bio/EnsEMBL/DBSQL/ArchiveStableIdAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/ArchiveStableIdAdaptor.pm
+5
-9
modules/Bio/EnsEMBL/Utils/ConversionSupport.pm
modules/Bio/EnsEMBL/Utils/ConversionSupport.pm
+12
-10
No files found.
modules/Bio/EnsEMBL/DBSQL/ArchiveStableIdAdaptor.pm
View file @
fdfac377
...
...
@@ -556,15 +556,11 @@ sub _lookup_version {
if
(
!
defined
$arch_id
->
{'
db_name
'}
)
{
# latest version of this stable id
$sql
=
qq(
SELECT new_db_name, new_version
FROM stable_id_event sie, mapping_session m
WHERE sie.mapping_session_id = m.mapping_session_id
AND new_stable_id = "@{[$arch_id->stable_id]}"
$EXTRA_SQL
ORDER BY m.created DESC
LIMIT 1)
;
my
$sql_tmp
=
"
SELECT new_db_name, new_version
";
$sql_tmp
.=
"
FROM stable_id_event sie, mapping_session m
";
$sql_tmp
.=
"
WHERE sie.mapping_session_id = m.mapping_session_id AND new_stable_id =
\"
@{
[$
arch_id
->
stable_id
]
}
\"
$EXTRA_SQL
";
$sql_tmp
.=
"
ORDER BY m.created DESC
";
$sql
=
$self
->
dbc
->
add_limit_clause
(
$sql_tmp
,
1
);
}
else
{
$sql
=
qq(
SELECT old_db_name, old_version
...
...
modules/Bio/EnsEMBL/Utils/ConversionSupport.pm
View file @
fdfac377
...
...
@@ -874,7 +874,7 @@ sub get_taxonomy_id {
Description : Retrieves the species scientific name (Genus species) from the
meta table
Return type : String - species scientific name
Exceptions : thrown if species name can
'
t be determined from db
Exceptions : thrown if species name can
no
t be determined from db
Caller : general
=cut
...
...
@@ -882,15 +882,17 @@ sub get_taxonomy_id {
sub
get_species_scientific_name
{
my
(
$self
,
$dba
)
=
@_
;
$dba
||=
$self
->
dba
;
my
$sql
=
qq(
SELECT
meta_value
FROM
meta
WHERE meta_key = "species.classification"
ORDER BY meta_id
LIMIT 2
)
;
my
$sql_tmp
=
"
SELECT meta_value FROM meta WHERE meta_key =
\
'species.classification
\
' ORDER BY meta_id
";
my
$sql
=
$dba
->
dbc
->
add_limit_clause
(
$sql_tmp
,
2
);
# my $sql = qq(
# SELECT
# meta_value
# FROM
# meta
# WHERE meta_key = "species.classification"
# ORDER BY meta_id
# LIMIT 2
# );
my
$sth
=
$dba
->
dbc
->
db_handle
->
prepare
(
$sql
);
$sth
->
execute
;
my
@sp
;
...
...
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