The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bio::DB::DBI::base - base class for drivers implementing Bio::DB::DBI

DESCRIPTION

Don't instantiate this module directly. Instead instantiate one of the derived classes.

FEEDBACK

Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated.

  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

Support

Please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.

Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:

  http://redmine.open-bio.org/projects/bioperl/

AUTHOR - Hilmar Lapp

Email hlapp at gmx.net

Describe contact details here

CONTRIBUTORS

Juguang Xiao, juguang at tll.org.sg

APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

new

 Title   : new
 Usage   : 
 Function: should only be called by derived classes
 Returns : 
 Args    : named parameters with tags -dbcontext (a Bio::DB::DBContextI
           implementing object) and -sequence_name (the name of the sequence
           for PK generation)

sequence_name

 Title   : sequence_name
 Usage   : $obj->sequence_name($newval)
 Function: Sets/Gets the name of the sequence to be used for PK generation if
           that name is not passed to the respective method as an argument.
 Example : 
 Returns : value of sequence_name (a scalar)
 Args    : new value (a scalar, optional)

build_dsn

 Title   : build_dsn
 Usage   :
 Function: Constructs the DSN string from the DBContextI object. Since this
           may be driver-specific, specific implementations may need to
           override this method.
 Example :
 Returns : a string (the DSN)
 Args    : a Bio::DB::DBContextI implementing object

get_connection

 Title   : get_connection
 Usage   :
 Function: Obtains a connection handle to the database represented by
           the the DBContextI object, passing additional args to the
           DBI->connect() method if a new connection is created.

           Contrary to new_connection(), this method will return
           shared connections from a pool. The implementation makes
           sure though that the returned handle was opened with the
           given parameters.

           In addition, the caller must not disconnect the obtained
           handle deliberately. Instead, the implementing object will
           disconnect and dispose of open handles once it is being
           garbage collected, or once disconnect() is called with the
           same or no parameters.

           Specific drivers usually won''t need to override this
           method but rather build_dsn().

           This implementation will call new_connection() to actually
           get a new connection if needed.

 Example :
 Returns : an open DBI database handle
 Args    : A Bio::DB::DBContextI implementing object. Additional hashref
           parameter to be passed to DBI->connect().

new_connection

 Title   : new_connection
 Usage   :
 Function: Obtains a new connection handle to the database represented by the
           the DBContextI object, passing additional args to the DBI->connect()
           method.

           This method is supposed to always open a new connection. Also, the
           implementing class is expected to release proper disconnection of
           the handle entirely to the caller.

           Specific drivers usually won''t need to override this method but
           rather build_dsn().
 Example :
 Returns : an open DBI database handle
 Args    : A Bio::DB::DBContextI implementing object. Additional hashref
           parameter to pass to DBI->connect().

disconnect

 Title   : disconnect
 Usage   :
 Function: Disconnects all or a certain number of connections matching the
           parameters. The connections affected are those previously obtained
           through get_connection() (shared connections from a pool).
 Example :
 Returns : none
 Args    : Optionally, a Bio::DB::DBContextI implementing object. 
           Additional hashref parameter with settings that were passed to
           get_connection().

conn_params

 Title   : conn_params
 Usage   : $dbi->conn_params($requestor, $newval)
 Function: Gets/sets connection parameters suitable for the specific
           driver and the specific requestor.

           A particular implementation may choose to ignore the
           requestor, but it may also use it to return different
           parameters, based on, e.g., which interface the requestor
           implements. Usually the caller will pass $self as the value
           $requestor, but an implementation is expected to accept
           a class or interface name as well.

 Example : 
 Returns : a hashref to be passed to get_connection() or new_connection()
           (which would pass it on to DBI->connect()).
 Args    : The requesting object, or alternatively its class name or
           interface.
           Optionally, on set the new value (which must be undef or a
           hashref).

_idsth

 Title   : _idsth
 Usage   : $obj->_idsth($newval)
 Function: Get/set the last/next id value statement handle from/to
           the cache.

           Consider this method 'protected' in OO-speak. I.e., call it
           from derived modules, but not from outside.

 Example : 
 Returns : a last_id_value or next_id_value prepared statement, or all
           statements cached under the database handle if the key literal
           is omitted
 Args    : the database handle for which to cache the statement,
           a key literal to distinguish between statements (e.g., 
           'last' and 'next'),
           and optionall on set the statement handle to cache

_remove_idsths

 Title   : _remove_idsths
 Usage   :
 Function: Un-caches all prepared statement handles cached under the
           given handle.
 Example :
 Returns : the list of previously cached statement handles
 Args    : the database handle