NAME

Bio::Das::ProServer::SourceAdaptor::Transport::dbi - A DBI transport layer (actually customised for MySQL)

VERSION

$Revision: 546 $

SYNOPSIS

DESCRIPTION

Transport helper class for database access, acting as a wrapper for DBI.

SUBROUTINES/METHODS

dbh - Database handle (mysqlish by default)

my $dbh = Bio::Das::ProServer::SourceAdaptor::Transport::dbi->dbh();

query - Execute a given query with given args

  my $arrayref = $dbitransport->query(qq(SELECT ... WHERE x = ? AND y = ?),
				      $x,
				      $y);

prepare - DBI pass-through of 'prepare'

my $sth = $dbitransport->prepare($query);

disconnect - DBI pass-through of disconnect

$dbitransport->disconnect();

last_modified - machine time of last data change

Only knows how to do this for MySQL databases.

$dbitransport->last_modified();

This method is only implemented for mysql databases.

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

[mysource]
transport      = dbi
driver         = dbdmodule (default: mysql)
dbhost         = myserver  (default: localhost)
dbport         = myport    (default: 3306)
dbuser         = me        (default: test)
dbpass         = password
dbname         = mydb
autodisconnect = yes|no|#

DEPENDENCIES

Bio::Das::ProServer::SourceAdaptor::Transport::generic
DBI

INCOMPATIBILITIES

BUGS AND LIMITATIONS

AUTHOR

Roger Pettett <rmp@sanger.ac.uk>.

LICENSE AND COPYRIGHT

Copyright (c) 2007 The Sanger Institute

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.