None available.
sub fetch_by_dbID
{ my ($self, $sequence_id) = @_;
my $sql = "SELECT sequence.sequence FROM sequence WHERE sequence_id = ?";
my $sth = $self->prepare($sql);
$sth->execute($sequence_id);
my ($sequence) = $sth->fetchrow_array();
$sth->finish();
return $sequence;
}
} |
sub store
{ my ($self, $sequence) = @_;
my $seqID;
return 0 unless($sequence);
my $dcs = $self->dbc->disconnect_when_inactive();
$self->dbc->disconnect_when_inactive(0);
my $length = length($sequence);
my $sth2 = $self->prepare("INSERT INTO sequence (sequence, length) VALUES (?,?)");
$sth2->execute($sequence, $length);
$seqID = $sth2->{'mysql_insertid'};
$sth2->finish;
$self->dbc->disconnect_when_inactive($dcs);
return $seqID;
}
1; } |