Bio::EnsEMBL::Hive::DBSQL
AnalysisDataAdaptor
Toolbar
Summary
Bio::EnsEMBL::Hive::DBSQL::AnalysisDataAdaptor
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
$dataDBA = $db_adaptor->get_AnalysisDataAdaptor;
Description
analysis_data table holds LONGTEXT data for use by the analysis system.
This data is general purpose and it's up to each analysis to
determine how to use it.
This Adaptor module is used to access/store this data.
Methods
fetch_by_dbID | No description | Code |
store | No description | Code |
store_if_needed | No description | Code |
Methods description
None available.
Methods code
fetch_by_dbID | description | prev | next | Top |
sub fetch_by_dbID
{ my ($self, $data_id) = @_;
my $sql = "SELECT data FROM analysis_data WHERE analysis_data_id = ?";
my $sth = $self->prepare($sql);
$sth->execute($data_id);
my ($data) = $sth->fetchrow_array();
$sth->finish();
return $data;
}
} |
sub store
{ my ($self, $data) = @_;
my $data_id;
return 0 unless($data);
my $sth2 = $self->prepare("INSERT INTO analysis_data (data) VALUES (?)");
$sth2->execute($data);
$data_id = $sth2->{'mysql_insertid'};
$sth2->finish;
return $data_id; } |
store_if_needed | description | prev | next | Top |
sub store_if_needed
{ my ($self, $data) = @_;
my $data_id;
return 0 unless($data);
my $sth = $self->prepare("SELECT analysis_data_id FROM analysis_data WHERE data = ?");
$sth->execute($data);
($data_id) = $sth->fetchrow_array();
$sth->finish;
if($data_id) {
return $data_id;
}
return $self->store($data);
}
1; } |
General documentation
The rest of the documentation details each of the object methods.
Internal methods are preceded with a _