Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::DBSQL::BaseMetaContainer Class Reference
Inheritance diagram for Bio::EnsEMBL::DBSQL::BaseMetaContainer:

List of all members.


Class Summary

Synopsis

  my $meta_container = $db_adaptor-\>get_MetaContainer();

  my @mapping_info =
    @{ $meta_container-\>list_value_by_key('assembly.mapping') };

Description

  An object that encapsulates access to db meta data
 

Definition at line 20 of file BaseMetaContainer.pm.

Available Methods

protected _columns ()
protected _default_where_clause ()
protected _final_clause ()
protected _left_join ()
protected _list_dbIDs ()
protected _objs_from_sth ()
protected _species_specific_key ()
protected _straight_join ()
protected _tables ()
public Listref bind_param_generic_fetch ()
public
Bio::EnsEMBL::DBSQL::DBAdaptor 
db ()
public
Bio::EnsEMBL::DBSQL::DBConnection 
dbc ()
public void delete_key ()
public void delete_key_value ()
public dump_data ()
public fetch_all ()
public Listref fetch_all_by_dbID_list ()
public Bio::EnsEMBL::Feature fetch_by_dbID ()
public Listref generic_fetch ()
public get_dumped_data ()
public Int get_schema_version ()
public Boolean is_multispecies ()
public Boolean key_value_exists ()
public Scalar last_insert_id ()
public Listref list_value_by_key ()
public
Bio::EnsEMBL::DBSQL::BaseAdaptor 
new ()
public DBI::StatementHandle prepare ()
public Scalar single_value_by_key ()
public Int species_id ()
public void store_key_value ()
public void update_key_value ()

Method Documentation

protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_default_where_clause ( ) [inherited]
protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_final_clause ( ) [inherited]

Undocumented method

Code:
click to view

Reimplemented in Bio::EnsEMBL::DBSQL::ExonAdaptor, Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor, and Bio::EnsEMBL::DBSQL::PredictionExonAdaptor.

protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_list_dbIDs ( ) [inherited]

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::DBSQL::BaseMetaContainer::_species_specific_key ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_straight_join ( ) [inherited]

Undocumented method

Code:
click to view
public Listref Bio::EnsEMBL::DBSQL::BaseAdaptor::bind_param_generic_fetch ( ) [inherited]
 Arg [1]   : (optional)  scalar $param
              This is the parameter to bind
 Arg [2]   : (optional) int $sql_type
              Type of the parameter (from DBI (:sql_types))
 Example   :  $adaptor->bind_param_generic_fetch($stable_id,SQL_VARCHAR);
              $adaptor->generic_fetch();
 Description:  When using parameters for the query, will call the bind_param to avoid
               some security issues. If there are no arguments, will return the bind_parameters
 ReturnType : listref
 Exceptions:  if called with one argument
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::DBAdaptor Bio::EnsEMBL::DBSQL::BaseAdaptor::db ( ) [inherited]
  Arg [1]    : (optional) Bio::EnsEMBL::DBSQL::DBAdaptor $obj 
               the database this adaptor is using.
  Example    : $db = $adaptor->db();
  Description: Getter/Setter for the DatabaseConnection that this adaptor is 
               using.
  Returntype : Bio::EnsEMBL::DBSQL::DBAdaptor
  Exceptions : none
  Caller     : Adaptors inherited from BaseAdaptor
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::DBConnection Bio::EnsEMBL::DBSQL::BaseAdaptor::dbc ( ) [inherited]
  Arg [1]    : (optional) Bio::EnsEMBL::DBSQL::DBConnection $obj 
               the database this adaptor is using.
  Example    : $db = $adaptor->db();
  Description: Getter/Setter for the DatabaseConnection that this adaptor is 
               using.
  Returntype : Bio::EnsEMBL::DBSQL::DBConnection
  Exceptions : none
  Caller     : Adaptors inherited from BaseAdaptor
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::DBSQL::BaseMetaContainer::delete_key ( )
  Arg [1]    : string $key
               The key which should be removed from the database.
  Example    : $meta_container->delete_key('sequence.compression');
  Description: Removes all rows from the meta table which have a meta_key
               equal to $key.
  Returntype : none
  Exceptions : none
  Caller     : dna_compress script, general
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::DBSQL::BaseMetaContainer::delete_key_value ( )
  Arg [1]    : string $key
               The key which should be removed from the database.
  Arg [2]    : string $value
               The value to be removed.
  Example    : $meta_container->delete_key('patch', 'patch_39_40_b.sql|xref_unique_constraint');
  Description: Removes all rows from the meta table which have a meta_key
               equal to $key, AND a meta_value equal to $value.
  Returntype : none
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::BaseAdaptor::dump_data ( ) [inherited]

Undocumented method

Code:
click to view
public Listref Bio::EnsEMBL::DBSQL::BaseAdaptor::fetch_all_by_dbID_list ( ) [inherited]
  Arg [1]    : listref of integers $id_list
               The unique database identifiers for the features to
               be obtained.
  Arg [2]    : optional - Bio::EnsEMBL::Slice to map features onto.
  Example    : @feats = @{$adaptor->fetch_all_by_dbID_list([1234, 2131, 982]))};
  Description: Returns the features created from the database
               defined by the the IDs in contained in the provided
               ID list $id_list.  The features will be returned
               in their native coordinate system.  That is, the
               coordinate system in which they are stored in the
               database.  In order to convert the features to a
               particular coordinate system use the transfer() or
               transform() method.  If none of the features are
               found in the database a reference to an empty list is
               returned.
  Returntype : listref of Bio::EnsEMBL::Features
  Exceptions : thrown if $id arg is not provided
               does not exist
  Caller     : general
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::DBSQL::OntologyTermAdaptor.

public Bio::EnsEMBL::Feature Bio::EnsEMBL::DBSQL::BaseAdaptor::fetch_by_dbID ( ) [inherited]
  Arg [1]    : int $id
               The unique database identifier for the feature to be obtained
  Example    : $feat = $adaptor->fetch_by_dbID(1234));
               $feat = $feat->transform('contig');
  Description: Returns the feature created from the database defined by the
               the id $id.  The feature will be returned in its native
               coordinate system.  That is, the coordinate system in which it
               is stored in the database.  In order to convert it to a
               particular coordinate system use the transfer() or transform()
               method.  If the feature is not found in the database then
               undef is returned instead
  Returntype : Bio::EnsEMBL::Feature or undef
  Exceptions : thrown if $id arg is not provided
               does not exist
  Caller     : general
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::DBSQL::AnalysisAdaptor, Bio::EnsEMBL::DBSQL::AssemblyExceptionFeatureAdaptor, Bio::EnsEMBL::DBSQL::CoordSystemAdaptor, Bio::EnsEMBL::DBSQL::DBEntryAdaptor, Bio::EnsEMBL::DBSQL::DensityTypeAdaptor, Bio::EnsEMBL::DBSQL::MiscSetAdaptor, Bio::EnsEMBL::DBSQL::OntologyTermAdaptor, Bio::EnsEMBL::DBSQL::ProteinFeatureAdaptor, Bio::EnsEMBL::DBSQL::RepeatConsensusAdaptor, Bio::EnsEMBL::DBSQL::TranslationAdaptor, Bio::EnsEMBL::Map::DBSQL::DitagAdaptor, Bio::EnsEMBL::Map::DBSQL::DitagFeatureAdaptor, Bio::EnsEMBL::Map::DBSQL::MarkerAdaptor, and Bio::EnsEMBL::Map::DBSQL::QtlAdaptor.

public Listref Bio::EnsEMBL::DBSQL::BaseAdaptor::generic_fetch ( ) [inherited]
  Arg [1]    : (optional) string $constraint
               An SQL query constraint (i.e. part of the WHERE clause)
  Arg [2]    : (optional) Bio::EnsEMBL::AssemblyMapper $mapper
               A mapper object used to remap features
               as they are retrieved from the database
  Arg [3]    : (optional) Bio::EnsEMBL::Slice $slice
               A slice that features should be remapped to
  Example    : $fts = $a->generic_fetch('contig_id in (1234, 1235)', 'Swall');
  Description: Performs a database fetch and returns feature objects in
               contig coordinates.
  Returntype : listref of Bio::EnsEMBL::SeqFeature in contig coordinates
  Exceptions : none
  Caller     : BaseFeatureAdaptor, ProxyDnaAlignFeatureAdaptor::generic_fetch
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::DBSQL::DataFileAdaptor.

public Bio::EnsEMBL::DBSQL::BaseAdaptor::get_dumped_data ( ) [inherited]

Undocumented method

Code:
click to view
public Int Bio::EnsEMBL::DBSQL::BaseMetaContainer::get_schema_version ( )
  Arg [1]    : none
  Example    : $schema_ver = $meta_container->get_schema_version();
  Description: Retrieves the schema version from the database meta table
  Returntype : int
  Exceptions : none
  Caller     : ?
  Status     : Medium risk
 
Code:
click to view
public Boolean Bio::EnsEMBL::DBSQL::BaseAdaptor::is_multispecies ( ) [inherited]
  Arg [1]    : (optional) boolean $arg
  Example    : if ($adaptor->is_multispecies()) { }
  Description: Getter/Setter for the is_multispecies boolean of
               to use for this adaptor.
  Returntype : boolean
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Boolean Bio::EnsEMBL::DBSQL::BaseMetaContainer::key_value_exists ( )
  Arg [1]    : string $key
               the key to check
  Arg [2]    : string $value
               the value to check
  Example    : if ($meta_container->key_value_exists($key, $value)) ...
  Description: Return true (1) if a particular key/value pair exists,
               false (0) otherwise.
  Returntype : boolean
  Exceptions : none
  Caller     : ?
  Status     : Stable
 
Code:
click to view
public Scalar Bio::EnsEMBL::DBSQL::BaseAdaptor::last_insert_id ( ) [inherited]
  Arg [1]     : (optional) $field the name of the field the inserted ID was pushed 
                into
  Arg [2]     : (optional) HashRef used to pass extra attributes through to the 
                DBD driver
  Description : Delegating method which uses DBI to extract the last inserted 
                identifier. If using MySQL we just call the DBI method 
                DBI::last_insert_id() since MySQL ignores any extra
                arguments. See DBI for more information about this 
                delegated method. 
  Example     : my $id = $self->last_insert_id('my_id'); my $other_id = $self->last_insert_id();
  Returntype  : Scalar or undef
 
Code:
click to view
public Listref Bio::EnsEMBL::DBSQL::BaseMetaContainer::list_value_by_key ( )
  Arg [1]    : string $key
               the key to obtain values from the meta table with
  Example    : my @values = @{ $meta_container->list_value_by_key($key) };
  Description: gets a value for a key. Can be anything 
  Returntype : listref of strings 
  Exceptions : none
  Caller     : ?
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::BaseAdaptor Bio::EnsEMBL::DBSQL::BaseAdaptor::new ( ) [inherited]
  Arg [1]    : Bio::EnsEMBL::DBSQL::DBConnection $dbobj
  Example    : $adaptor = new AdaptorInheritedFromBaseAdaptor($dbobj);
  Description: Creates a new BaseAdaptor object.  The intent is that this
               constructor would be called by an inherited superclass either
               automatically or through $self->SUPER::new in an overridden 
               new method.
  Returntype : Bio::EnsEMBL::DBSQL::BaseAdaptor
  Exceptions : none
  Caller     : Bio::EnsEMBL::DBSQL::DBConnection
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::DBSQL::AnalysisAdaptor, Bio::EnsEMBL::DBSQL::AssemblyExceptionFeatureAdaptor, Bio::EnsEMBL::DBSQL::AssemblyMapperAdaptor, Bio::EnsEMBL::DBSQL::AssemblySliceAdaptor, Bio::EnsEMBL::DBSQL::AttributeAdaptor, Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor, Bio::EnsEMBL::DBSQL::CoordSystemAdaptor, Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor, Bio::EnsEMBL::DBSQL::DensityTypeAdaptor, Bio::EnsEMBL::DBSQL::GOTermAdaptor, Bio::EnsEMBL::DBSQL::MetaCoordContainer, Bio::EnsEMBL::DBSQL::MiscSetAdaptor, Bio::EnsEMBL::DBSQL::SequenceAdaptor, Bio::EnsEMBL::DBSQL::SliceAdaptor, Bio::EnsEMBL::DBSQL::SOTermAdaptor, Bio::EnsEMBL::DBSQL::StrainSliceAdaptor, Bio::EnsEMBL::DBSQL::UnmappedObjectAdaptor, and Bio::EnsEMBL::External::BlastAdaptor.

public DBI::StatementHandle Bio::EnsEMBL::DBSQL::BaseAdaptor::prepare ( ) [inherited]
  Arg [1]    : string $string
               a SQL query to be prepared by this adaptors database
  Example    : $sth = $adaptor->prepare("select yadda from blabla")
  Description: provides a DBI statement handle from the adaptor. A convenience
               function so you dont have to write $adaptor->db->prepare all the
               time
  Returntype : DBI::StatementHandle
  Exceptions : none
  Caller     : Adaptors inherited from BaseAdaptor
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::DBSQL::SliceAdaptor, and Bio::EnsEMBL::External::BlastAdaptor.

public Scalar Bio::EnsEMBL::DBSQL::BaseMetaContainer::single_value_by_key ( )
  Arg [1]    : string $key
               the key to obtain values from the meta table with
  Arg [2]    : boolean $warn
               If true will cause the code to warn the non-existence of a value
  Example    : my $value = $mc->single_value_by_key($key);
  Description: Gets a value for a key. Can be anything
  Returntype : Scalar
  Exceptions : Raised if more than 1 meta item is returned
 
Code:
click to view
public Int Bio::EnsEMBL::DBSQL::BaseAdaptor::species_id ( ) [inherited]
  Arg [1]    : (optional) int $species_id
               The internal ID of the species in a multi-species database.
  Example    : $db = $adaptor->db();
  Description: Getter/Setter for the internal ID of the species in a
               multi-species database.  The default species ID is 1.
  Returntype : Integer
  Exceptions : none
  Caller     : Adaptors inherited from BaseAdaptor
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::DBSQL::BaseMetaContainer::store_key_value ( )
  Arg [1]    : string $key
               a key under which $value should be stored
  Arg [2]    : string $value
               the value to store in the meta table
  Example    : $meta_container->store_key_value($key, $value);
  Description: stores a value in the meta container, accessable by a key
  Returntype : none
  Exceptions : Thrown if the key/value already exists.
  Caller     : ?
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::DBSQL::BaseMetaContainer::update_key_value ( )
  Arg [1]    : string $key
               a key under which $value should be updated
  Arg [2]    : string $value
               the value to update in the meta table
  Example    : $meta_container->update_key_value($key, $value);
  Description: update a value in the meta container, accessable by a key
  Returntype : none
  Exceptions : none
  Caller     : ?
  Status     : Stable
 
Code:
click to view

The documentation for this class was generated from the following file: