[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Thu May 8 14:24:09 UTC 2003


mwilkinson
Thu May  8 10:24:09 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv417/Perl/MOBY

Modified Files:
	OntologyServer.pm 
Log Message:
temp commit to get some changes over.  Client library broken
moby-live/Perl/MOBY OntologyServer.pm,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2003/05/07 19:20:27	1.1
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2003/05/08 14:24:09	1.2
@@ -129,7 +129,13 @@
     }
     
     $self->dbh->do(q{delete from object where object_id = ?}, undef,$id );
+    if ($self->dbh->err){
+        return (0, "Delete from Object Class table failed: $self->dbh->errstr", $id);
+    }
     $self->dbh->do(q{delete from object_term2term where object1_id = ?}, undef,$id );
+    if ($self->dbh->err){
+        return (0, "Delete from Object term2term table failed: $self->dbh->errstr", $id);
+    }
     
     return (1,"Object $term Deleted",$self->setURI($id));
 }
@@ -145,7 +151,13 @@
     }
     
     $self->dbh->do(q{delete from object where object_id = ?}, undef,$id );
+    if ($self->dbh->err){
+        return (0, "Delete from Object Class table failed: $self->dbh->errstr", $id);
+    }
     $self->dbh->do(q{delete from object_term2term where object1_id = ?}, undef,$id );
+    if ($self->dbh->err){
+        return (0, "Delete from Object term2term table failed: $self->dbh->errstr", $id);
+    }
     
     return (1,"Object $term Deleted",$self->setURI($id));
 }
@@ -258,7 +270,13 @@
     }
     
     $self->dbh->do(q{delete from service where service_id = ?}, undef,$id );
+    if ($self->dbh->err){
+        return (0, "Delete from Service Type table failed: $self->dbh->errstr", $id);
+    }
     $self->dbh->do(q{delete from service_term2term where service1_id = ?}, undef,$id );
+    if ($self->dbh->err){
+        return (0, "Delete from Service Type Term2Term table failed: $self->dbh->errstr", $id);
+    }
     
     return (1,"Service Type $term Deleted",$self->setURI($id));    
 }
@@ -333,7 +351,13 @@
     }
     
     $self->dbh->do(q{delete from namespace where namespace_id = ?}, undef,$id );
+    if ($self->dbh->err){
+        return (0, "Delete from namespace table failed: $self->dbh->errstr", $id);
+    }
     $self->dbh->do(q{delete from namespace_term2term where namespace1_id = ?}, undef,$id );
+    if ($self->dbh->err){
+        return (0, "Delete from namespace term2term table failed: $self->dbh->errstr", $id);
+    }
     
     return (1,"Namespace Type $term Deleted",$self->setURI($id));        
 }




More information about the MOBY-guts mailing list