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

List of all members.


Class Summary

Synopsis

  my $dbc = Bio::EnsEMBL::DBSQL::DBConnection-\>new(-HOST =\> 'host', -PORT =\> 3306, -USER =\> 'user');
  my $p_h_dbc = Bio::EnsEMBL::DBSQL::ProxyDBConnection-\>new(-DBC =\> $dbc, -DBNAME =\> 'human');
  my $p_m_dbc = Bio::EnsEMBL::DBSQL::ProxyDBConnection-\>new(-DBC =\> $dbc, -DBNAME =\> 'mouse');

Description

This class is used to maintain one active connection to a database whilst it
appears to be working against multiple schemas. It does this by checking the
currently connected database before performing any query which could require
a database change such as prepare.
This class is only intended for internal use so please do not use unless
you are aware of what it will do and what the consequences of its usage are.
 

Definition at line 25 of file ProxyDBConnection.pm.

Available Methods

protected Any __proxy ()
protected __resolver ()
public void AUTOLOAD ()
public Code can ()
public dbname ()
public void DESTROY ()
public Boolean isa ()
public new ()
public switch_database ()

Method Documentation

protected Any Bio::EnsEMBL::Utils::Proxy::__proxy ( ) [inherited]
 
  Example			: -
  Description	: The proxy accessor
  Returntype 	: Any the proxied object
  Exceptions 	: None 
  Caller     	: -
  Status     	: -
 
Code:
click to view
protected Bio::EnsEMBL::DBSQL::ProxyDBConnection::__resolver ( )

Undocumented method

Code:
click to view

Reimplemented from Bio::EnsEMBL::Utils::Proxy.

public void Bio::EnsEMBL::Utils::Proxy::AUTOLOAD ( ) [inherited]
  Example     : -
  Description : Performs calls to __resolver() and installs the subroutine
                into the current package scope.
  Returntype  : None 
  Exceptions  : Thrown if __resolver() could not return a subroutine
  Caller      : -
  Status      : -
 
Code:
click to view
public Code Bio::EnsEMBL::Utils::Proxy::can ( ) [inherited]
  Args       	: Method name to test
  Example			: $obj->can('__proxy');
  Description	: Overriden to provide can() support for proxies. Will return
                true if this object implements the given method or the
                proxied object can
  Returntype 	: Code; performs same as a normal can
  Exceptions 	: None
  Caller     	: caller
  Status     	: status
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::ProxyDBConnection::dbname ( )

Undocumented method

Code:
click to view
public void Bio::EnsEMBL::Utils::Proxy::DESTROY ( ) [inherited]
  Example			: -
  Description	: Provided because of AutoLoad
  Returntype 	: None 
  Exceptions 	: None
  Caller     	: -
  Status     	: -
 
Code:
click to view
public Boolean Bio::EnsEMBL::Utils::Proxy::isa ( ) [inherited]
  Args        : Object type to test
  Example     : $obj->isa('Bio::EnsEMBL::Utils::Proxy');
  Description : Overriden to provide isa() support for proxies. Will return
                true if this object is assignable to the given type or the
                proxied object is
  Returntype  : Boolean; performs same as a normal can
  Exceptions  : None
  Caller      : caller
  Status      : status
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::ProxyDBConnection::new ( )

Undocumented method

Code:
click to view

Reimplemented from Bio::EnsEMBL::Utils::Proxy.

public Bio::EnsEMBL::DBSQL::ProxyDBConnection::switch_database ( )
  Description : Performs a switch of the backing DBConnection if the currently
                connected database is not the same as the database this proxy
                wants to connect to. It currently supports MySQL, Oracle and
                Postges switches is untested with all bar MySQL. If it
                cannot do a live DB/schema switch then it will disconnect
                the connection and then wait for the next process to
                connect therefore switching the DB.
  Exceptions  : None but will warn if you attempt to switch a DB with 
                active kids attached to the proxied database handle.
 
Code:
click to view

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