Skip to content
Snippets Groups Projects
Commit 0b65502a authored by Felix Kokocinski's avatar Felix Kokocinski
Browse files

added update_ditag() method

parent 638b55ad
No related branches found
No related tags found
No related merge requests found
......@@ -269,7 +269,8 @@ sub store {
$sth->execute($ditag->name, $ditag->type);
if($sth->fetchrow() > 0){
warning( "Ditag with name/type ".$ditag->name." / ".$ditag->type.
" is already stored in this database." );
" is already stored in this database.\n".
"Use $da->update_ditag() instead.");
next TAG;
}
......@@ -329,6 +330,30 @@ sub print_creation {
}
=head2 update_ditag
Arg [1] : ditag to update
Description: update an existing ditag with new values
Returntype : 1 on success
=cut
sub update_ditag {
my ($self, $ditag) = @_;
my $sth = $self->prepare( "UPDATE ditag SET name=?, type=?, tag_count=?, sequence=? where ditag_id=?;" );
my $result =$sth->execute(
$ditag->name,
$ditag->type,
$ditag->tag_count,
$ditag->sequence,
$ditag->dbID,
);
return $result;
}
=head2 list_dbIDs
Args : None
......
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