Bio::EnsEMBL::Hive::DBSQL AnalysisDataAdaptor
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
  Bio::EnsEMBL::Hive::DBSQL::AnalysisDataAdaptor
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::DBSQL::BaseAdaptor
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Inherit
Bio::EnsEMBL::DBSQL::BaseAdaptor
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_dbIDdescriptionprevnextTop
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;
}

#
# STORE METHODS
#
################
}
storedescriptionprevnextTop
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_neededdescriptionprevnextTop
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) {
    # print("data already stored as id $data_id\n");
return $data_id; } return $self->store($data); } 1;
}
General documentation
CONTACTTop
  Contact Jessica Severin on implemetation/design detail: jessica@ebi.ac.uk
Contact Ewan Birney on EnsEMBL in general: birney@sanger.ac.uk
APPENDIXTop
  The rest of the documentation details each of the object methods.
Internal methods are preceded with a _