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-hive
Commits
0e34c22b
Commit
0e34c22b
authored
Jun 08, 2004
by
Jessica Severin
Browse files
forgot to insert the branch_code in the store() method
parent
9754ee32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
modules/Bio/EnsEMBL/Hive/DBSQL/DataflowRuleAdaptor.pm
modules/Bio/EnsEMBL/Hive/DBSQL/DataflowRuleAdaptor.pm
+17
-3
No files found.
modules/Bio/EnsEMBL/Hive/DBSQL/DataflowRuleAdaptor.pm
View file @
0e34c22b
...
...
@@ -86,15 +86,15 @@ sub store {
my
$dataflow_rule_id
;
my
$sth
=
$self
->
prepare
(
q{INSERT ignore INTO dataflow_rule
SET from_analysis_id = ?, to_analysis_url = ? }
);
if
(
$sth
->
execute
(
$rule
->
from_analysis_id
,
$rule
->
to_analysis_url
))
{
SET from_analysis_id = ?, to_analysis_url = ?
, branch_code=?
}
);
if
(
$sth
->
execute
(
$rule
->
from_analysis_id
,
$rule
->
to_analysis_url
,
$rule
->
branch_code
))
{
$dataflow_rule_id
=
$sth
->
{'
mysql_insertid
'};
$sth
->
finish
();
$rule
->
dbID
(
$dataflow_rule_id
);
#print(" stored with dbID = $dataflow_rule_id\n");
}
else
{
#print(" failed to execute -> already inserted -> need to get dbID\n");
$sth
->
finish
();
$sth
->
finish
();
$sth
=
$self
->
prepare
(
q{SELECT dataflow_rule_id FROM dataflow_rule WHERE
from_analysis_id = ? AND to_analysis_url = ? }
);
$sth
->
execute
(
$rule
->
from_analysis_id
,
$rule
->
to_analysis_url
);
...
...
@@ -130,6 +130,20 @@ sub remove {
$sth
->
execute
;
}
sub
create_rule
{
my
(
$self
,
$fromAnalysis
,
$toAnalysis
,
$branchCode
)
=
@_
;
return
unless
(
$fromAnalysis
and
$toAnalysis
);
my
$rule
=
Bio::EnsEMBL::Hive::
DataflowRule
->
new
();
$rule
->
from_analysis
(
$fromAnalysis
);
$rule
->
to_analysis
(
$toAnalysis
);
$rule
->
branch_code
(
$branchCode
)
if
(
defined
(
$branchCode
));
$self
->
store
(
$rule
);
}
############################
#
# INTERNAL METHODS
...
...
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