[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Fri Oct 17 18:29:52 EDT 2003
mwilkinson
Fri Oct 17 17:29:51 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv25355/MOBY
Modified Files:
Central.pm
Log Message:
bug fixes as per Martins reports
moby-live/Perl/MOBY Central.pm,1.107,1.108
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2003/10/15 14:02:01 1.107
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2003/10/17 21:29:51 1.108
@@ -1904,7 +1904,7 @@
my ($pkg) = shift;
my $dbh = MOBY::central_db_connection->new()->dbh;
- my $sth = $dbh->prepare("select authority_uri, servicename from authority natural join service_instance");
+ my $sth = $dbh->prepare("select authority_uri, servicename from authority as a, service_instance as s where s.authority_id = a.authority_id");
$sth->execute;
my $names = "<serviceNames>\n";
while (my ($auth, $name) = $sth->fetchrow_array){
@@ -2261,10 +2261,10 @@
-=head2 DUMP
+=head2 DUMP_MySQL
- Title : DUMP
- Usage : ($central,$object,$service,$namespace,$relat) = $MOBY->DUMP()
+ Title : DUMP_MySQL
+ Usage : $SQL = $MOBY->DUMP_MySQL; ($central,$object,$service,$namespace,$relat) = @{$SQL};
Function : return a mysql dump of each of the current MOBY Central databases
Returns : an array of SQL strings that can be used to recreate the database locally
Args : none
@@ -2272,7 +2272,7 @@
=cut
-sub DUMP {
+sub DUMP_MySQL {
my ($pkg) = @_;
open (IN, "/usr/local/bin/mysqldump -u mobycentral mobycentral |") || die "can't open mobycentral for dumping";
my @response;
@@ -2280,7 +2280,6 @@
push @response, $_;
}
my $mobycentral = (join "", @response);
- print STDERR "MOBYCENTRAL $mobycentral\n\n\n";
close IN;
open (IN, "/usr/local/bin/mysqldump -u mobycentral mobyobject |") || die "can't open mobyobject for dumping";
@@ -2289,7 +2288,7 @@
push @response, $_;
}
my $mobyobject = (join "", @response);
- print STDERR "MOBYOBJECT $mobyobject\n\n\n";
+
close IN;
open (IN, "/usr/local/bin/mysqldump -u mobycentral mobyservice |") || die "can't open mobyservice for dumping";
@response = ();
@@ -2313,9 +2312,10 @@
}
my $mobyrelationship = (join "", @response);
close IN;
- return ($mobycentral, $mobyobject, $mobyservice, $mobynamespace, $mobyrelationship);
+ return [$mobycentral, $mobyobject, $mobyservice, $mobynamespace, $mobyrelationship];
}
+*DUMP = \&DUMP_MySQL; # alias it for backward compatibility
sub _flatten {
# from a given term, traverse the ontology
More information about the MOBY-guts
mailing list