BioMart::Configuration RegistryDBPointer
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
BioMart::Configuration::RegistryDBPointer
Package variables
No package variables defined.
Inherit
BioMart::Configuration::DBLocation
Synopsis
A Location that represents the configuration for a mart database accessed
directly from the DB server
Description
Methods
_newDescriptionCode
getRegistryXML
No description
Code
Methods description
_newcode    nextTop
  Usage      : see Usage for BioMart::Configuration::Location.
Description: creates a new MartDBLocation object which ...
Returntype : BioMart::Configuration::MartDBLocation
Exceptions : none
Caller : general
Methods code
_newdescriptionprevnextTop
sub _new {
    my ($self, @param) = @_;
  
    $self->SUPER::_new(@param);
}
getRegistryXMLdescriptionprevnextTop
sub getRegistryXML {
    my $self=shift;

    my $dbh=$self->dbh();
    my $dsn=$self->dsn();

    unless ($dbh) {
	warn("\n\nWARNING: Could not load Registry from database $dsn, SKIPPING\n\n");
	return undef;
    }

    # stops XML too long bug
$dbh->{'LongTruncOk'} = 1; $dbh->{'LongReadLen'} = 20000; my $sql = "SELECT compressed_xml FROM ".$self->schema.".meta_registry"; my $sth = $dbh->prepare($sql); unless ($sth) { my $err = $dbh->errstr; $dbh->disconnect; BioMart::Exception::Database->throw("Could not prepare statement handle for registry fetch for db $dsn: $err"); } my $executed = $sth->execute; unless ($executed) { my $err = $dbh->errstr; $sth->finish; $dbh->disconnect; BioMart::Exception::Database->throw("Could not execute sql for $dsn: $err"); } my $row = $sth->fetchrow_arrayref; my $xml = Compress::Zlib::memGunzip($row->[0]) ; $sth->finish; $dbh->disconnect; return $xml; } 1;
}
General documentation
AUTHOR - Arek Kasprzyk, Damian SmedleyTop
CONTACTTop
This module is part of the BioMart project http://www.biomart.org
Questions can be posted to the mart-dev mailing list: mart-dev@ebi.ac.uk