Skip to content
Snippets Groups Projects
Commit ace7d563 authored by Javier Herrero's avatar Javier Herrero
Browse files

New remove_by_condition_analysis_url method

parent ec2f4717
No related branches found
No related tags found
No related merge requests found
...@@ -117,28 +117,23 @@ sub store { ...@@ -117,28 +117,23 @@ sub store {
} }
=head2 remove =head2 remove_by_condition_analysis_url
Arg[1] : Bio::EnsEMBL::Hive::AnalysisCtrlRule which must be persistent Arg[1] : string condition_analysis_url
with a valid dbID. Usage : $self->remove_by_condition_analysis_url("ThisAnalysisLogicName");
Usage : $self->remove( $rule ); Function: removes all the control rules for this condition analysis URL
Function: removes given object from database.
Returns : - Returns : -
=cut =cut
sub remove { sub remove_by_condition_analysis_url {
my ( $self, $rule ) = @_; my ( $self, $condition_analysis_url ) = @_;
my $dbID = $rule->dbID; my $sth = $self->prepare("DELETE FROM analysis_ctrl_rule WHERE condition_analysis_url =?");
if( !defined $dbID ) { $sth->execute($condition_analysis_url);
throw( "AnalysisCtrlRuleAdaptor->remove called with non persistent AnalysisCtrlRule" );
}
my $sth = $self->prepare("DELETE FROM analysis_ctrl_rule WHERE ctrled_analysis_id = ?, condition_analysis_url = '?'");
$sth->execute($rule->ctrled_analysis_id, $rule->condition_analysis_url);
} }
=head2 create_rule =head2 create_rule
Arg[1] : condition analysis object (Bio::EnsEMBL::Analysis object) Arg[1] : condition analysis object (Bio::EnsEMBL::Analysis object)
...@@ -284,4 +279,3 @@ sub _generic_fetch { ...@@ -284,4 +279,3 @@ sub _generic_fetch {
1; 1;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment