Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
37e1ec4a
Commit
37e1ec4a
authored
21 years ago
by
Web Admin
Browse files
Options
Downloads
Patches
Plain Diff
js5 tidy query
parent
35f33923
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
+8
-6
8 additions, 6 deletions
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/MiscFeatureAdaptor.pm
+1
-1
1 addition, 1 deletion
modules/Bio/EnsEMBL/DBSQL/MiscFeatureAdaptor.pm
with
9 additions
and
7 deletions
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
+
8
−
6
View file @
37e1ec4a
...
...
@@ -113,7 +113,7 @@ sub generic_fetch {
if
(
exists
$left_join_hash
{
$t
->
[
0
]
}
)
{
my
$condition
=
$left_join_hash
{
$t
->
[
0
]
};
my
$syn
=
$t
->
[
1
];
$left_join
.=
"
LEFT JOIN
"
.
$t
->
[
0
]
.
"
$syn
ON
$condition
";
$left_join
.=
"
LEFT JOIN
\n
"
.
$t
->
[
0
]
.
"
$syn
ON
$condition
";
}
else
{
push
@tables
,
$t
;
}
...
...
@@ -125,26 +125,28 @@ sub generic_fetch {
#construct a nice table string like 'table1 t1, table2 t2'
my
$tablenames
=
join
('
,
',
map
({
join
('
',
@
$_
)
}
@tables
));
my
$sql
=
"
SELECT
$columns
FROM
$tablenames
$left_join
";
my
$sql
=
"
SELECT
$columns
\n
FROM
$tablenames
$left_join
";
my
$default_where
=
$self
->
_default_where_clause
;
my
$final_clause
=
$self
->
_final_clause
;
#append a where clause if it was defined
if
(
$constraint
)
{
$sql
.=
"
where
$constraint
";
$sql
.=
"
\n
WHERE
$constraint
";
if
(
$default_where
)
{
$sql
.=
"
and
$default_where
";
$sql
.=
"
AND
\n
$default_where
";
}
}
elsif
(
$default_where
)
{
$sql
.=
"
where
$default_where
";
$sql
.=
"
\n
WHERE
$default_where
";
}
#append additional clauses which may have been defined
$sql
.=
"
$final_clause
";
$sql
.=
"
\n
$final_clause
";
###print STDERR "\n\n$sql\n\n";
warn
"
JS5 misc set queries======================
\n
$sql
\n
";
my
$sth
=
$db
->
prepare
(
$sql
);
$sth
->
execute
;
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/DBSQL/MiscFeatureAdaptor.pm
+
1
−
1
View file @
37e1ec4a
...
...
@@ -250,7 +250,7 @@ sub _left_join {
sub
_final_clause
{
my
$self
=
shift
;
return
"
order by
mf.misc_feature_id
";
return
"
ORDER BY
mf.misc_feature_id
";
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment