[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Tue Jan 11 22:17:12 UTC 2005


mwilkinson
Tue Jan 11 17:17:11 EST 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi
In directory pub.open-bio.org:/tmp/cvs-serv15603/MOBY/Adaptor/moby/queryapi

Modified Files:
	mysql.pm 
Log Message:
error in the sql statement that writes collection inputs and outputs.  The service_instance_id should be NULL for collections

moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm	2005/01/11 21:49:49	1.7
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm	2005/01/11 22:17:11	1.8
@@ -124,7 +124,8 @@
 sub insert_simple_input {
 	my ($self, %args) = @_;	
 	my $dbh = $self->dbh;
-	
+	my $si = $args{collection_input_id}?'':$args{service_instance_id};
+		
 	$dbh->do("insert into simple_input
 				 (object_type_uri,
 				  namespace_type_uris,
@@ -137,7 +138,7 @@
 		$args{namespace_type_uris},
 		$args{article_name},
 # here
-		$args{collection_input_id}?'':$args{service_instance_id},
+        $si,
 		$args{collection_input_id}));
 	my $id=$dbh->{mysql_insertid};
 	return $id;
@@ -147,7 +148,8 @@
 sub insert_simple_output {
 	my ($self, %args) = @_;	
 	my $dbh = $self->dbh;
-	
+	my $si = $args{collection_output_id}?'':$args{service_instance_id};
+
 	$dbh->do("insert into simple_output
 				 (object_type_uri,
 				  namespace_type_uris,
@@ -160,7 +162,7 @@
 		$args{namespace_type_uris},
 		$args{article_name},
 # and here
-		$args{collection_output_id}?'',$args{service_instance_id},
+        $si,
 		$args{collection_output_id}));
 	my $id=$dbh->{mysql_insertid};
 	return $id;




More information about the MOBY-guts mailing list