Bio::Das::ProServer::SourceHydra::dbi - A database-backed implementation of B::D::P::SourceHydra


NAME

Bio::Das::ProServer::SourceHydra::dbi - A database-backed implementation of B::D::P::SourceHydra

Back to Top


VERSION

$Revision: 687 $

Back to Top


AUTHOR

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

Back to Top


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.

Back to Top


DESCRIPTION

Back to Top


SYNOPSIS

  my $dbiHydra = Bio::Das::ProServer::SourceHydra::dbi->new();

Back to Top


SUBROUTINES/METHODS

sources : DBI sources

  Effectively returns the results of a SHOW TABLES LIKE '$basename%'
  query. In Oracle I guess this would need changing to table_name from
  all_tables where like '$basename%' or something.
  my @sources = $dbihydra->sources();
  $basename comes from $self->config->{'basename'};
  This routine caches results for $CACHE_TIMEOUT as show tables can be
  slow for a few thousand sources.

last_modified : machine time of last data change

  Gets the most recent update time for any of the hydra's tables.
  Only knows how to do this for MySQL databases.
  my $unixtime = $dbihydra->last_modified();

Back to Top


DIAGNOSTICS

Run ProServer with the -debug flag.

Back to Top


CONFIGURATION AND ENVIRONMENT

  [mysimplehydra]
  adaptor   = simpledb           # SourceAdaptor to clone
  hydra     = dbi                # Hydra implementation to use
  transport = dbi
  basename  = hydra              # dbi: basename for db tables containing servable data
  dbname    = proserver
  dbhost    = mysql.example.com
  dbuser    = proserverro
  dbpass    = topsecret

Back to Top


DEPENDENCIES

Bio::Das::ProServer::SourceHydra

Back to Top


INCOMPATIBILITIES

Back to Top


BUGS AND LIMITATIONS

The last_modified method only works for MySQL databases.

Back to Top

 Bio::Das::ProServer::SourceHydra::dbi - A database-backed implementation of B::D::P::SourceHydra