ensembl-hive  2.5
Bio::EnsEMBL::Hive::DBSQL::DBConnection Class Reference
+ Inheritance diagram for Bio::EnsEMBL::Hive::DBSQL::DBConnection:

Public Member Functions

public new ()
 
protected _optional_pair ()
 
public to_url_hash ()
 
public String url ()
 
public connect ()
 
public protected_prepare_execute ()
 
public to_cmd ()
 
public run_in_transaction ()
 
public Boolean has_write_access ()
 
public void requires_write_access ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Hive::DBSQL::CoreDBConnection
public Bio::EnsEMBL::DBSQL::DBConnection new ()
 
public void connect ()
 
public Undef connected ()
 
public disconnect_count ()
 
public wait_timeout ()
 
public query_count ()
 
public Boolean equals ()
 
public String driver ()
 
public String port ()
 
public String dbname ()
 
public String username ()
 
public String user ()
 
public String host ()
 
public String hostname ()
 
public String password ()
 
public String pass ()
 
public Boolean disconnect_when_inactive ()
 
public Boolean reconnect_when_lost ()
 
public String locator ()
 
public DBI db_handle ()
 
public DBI prepare ()
 
public void reconnect ()
 
public Any work_with_db_handle ()
 
public void prevent_disconnect ()
 
public Boolean disconnect_if_idle ()
 
public do ()
 
public AUTOLOAD ()
 
public DESTROY ()
 

Detailed Description

Synopsis

my $url = $dbc->url();

Description

    Extends the functionality of Bio::EnsEMBL::Hive::DBSQL::CoreDBConnection with things needed by the Hive

Definition at line 19 of file DBConnection.pm.

Member Function Documentation

◆ _optional_pair()

protected Bio::EnsEMBL::Hive::DBSQL::DBConnection::_optional_pair ( )

Undocumented method

Code:
click to view

◆ connect()

public Bio::EnsEMBL::Hive::DBSQL::DBConnection::connect ( )

Undocumented method

Code:
click to view

◆ has_write_access()

public Boolean Bio::EnsEMBL::Hive::DBSQL::DBConnection::has_write_access ( )
  Example     :
my $can_do = $dbc->has_write_access();
  Description : Tells whether the underlying database connection has write access to the database
  Returntype  : Boolean
  Exceptions  : none
  Caller      : general
  Status      : Stable
 
Code:
click to view

◆ new()

public Bio::EnsEMBL::Hive::DBSQL::DBConnection::new ( )

Undocumented method

Code:
click to view

◆ protected_prepare_execute()

public Bio::EnsEMBL::Hive::DBSQL::DBConnection::protected_prepare_execute ( )

Undocumented method

Code:
click to view

◆ requires_write_access()

public void Bio::EnsEMBL::Hive::DBSQL::DBConnection::requires_write_access ( )
  Example     :
$dbc->requires_write_access();
  Description : See Exceptions
  Returntype  : none
  Exceptions  : Throws if the current user hasn't write access to the database
  Caller      : general
  Status      : Stable
 
Code:
click to view

◆ run_in_transaction()

public Bio::EnsEMBL::Hive::DBSQL::DBConnection::run_in_transaction ( )
    Description : Wrapper that first sets AutoCommit to 0, runs some user code, and at the end issues a commit() / rollback()
                  It also has to temporarily set disconnect_when_inactive() to 1 because a value of 0 would cause the
                  DBConnection object to disconnect early, which would rollback the transaction.
                  NB: This is essentially a trimmed copy of Ensembl's Utils::SqlHelper::transaction()
 
Code:
click to view

◆ to_cmd()

public Bio::EnsEMBL::Hive::DBSQL::DBConnection::to_cmd ( )

Undocumented method

Code:
click to view

◆ to_url_hash()

public Bio::EnsEMBL::Hive::DBSQL::DBConnection::to_url_hash ( )

Undocumented method

Code:
click to view

◆ url()

public String Bio::EnsEMBL::Hive::DBSQL::DBConnection::url ( )
    Arg [1]    : String $environment_variable_name_to_store_password_in (optional)
    Example    :
$url = $dbc->url;
    Description: Constructs a URL string for this database connection.
    Returntype : string of format  mysql://<user>:<pass><host>:<port>/<dbname>
                               or  sqlite:///<dbname>
    Exceptions : none
    Caller     : general
 
Code:
click to view

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