[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Tue Jul 26 23:50:37 UTC 2005


mwilkinson
Tue Jul 26 19:50:37 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi
In directory pub.open-bio.org:/tmp/cvs-serv26036/MOBY/Adaptor/moby/queryapi

Modified Files:
	mysql.pm 
Log Message:
fixing extra bind arguments in auto-generated SQL

moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.41,1.42
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm	2005/07/26 23:39:33	1.41
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm	2005/07/26 23:50:37	1.42
@@ -476,8 +476,13 @@
           contact_email
           from object $condition";
 
-	my $dbh = $self->dbh; 	
- 	my $result = do_query($dbh, $statement, ($type));
+	my $dbh = $self->dbh;
+	my $result;
+	if ($type){
+	    $result = do_query($dbh, $statement, ($type));
+	} else {
+	    $result = do_query($dbh, $statement);
+	}	    
  	return $result;		
 }
 
@@ -812,7 +817,12 @@
           authority,
           contact_email
           from service $condition";
- 	my $result = do_query($dbh, $statement, ($type));
+	my $result;
+	if ($type){
+	    $result = do_query($dbh, $statement, ($type));
+	} else {
+	    $result = do_query($dbh, $statement);
+	}
  	return $result;		
 }
 
@@ -949,9 +959,9 @@
 	return [{}] unless $type;
 	my $condition = "";
 	if ($type =~ /^urn\:lsid/){
-	    $condition = " where namespace_lsid = ? and ";
+	    $condition = " where namespace_lsid = ?";
 	} elsif ($type) {
-	    $condition = " where namespace_type = ? and";
+	    $condition = " where namespace_type = ?";
 	}
 	my $dbh = $self->dbh;
 	
@@ -963,7 +973,12 @@
           authority,
           contact_email
           from namespace $condition";
- 	my $result = do_query($dbh, $statement, ($type));
+	my $result;
+	if ($type){
+	    $result = do_query($dbh, $statement, ($type));
+	} else {
+	    $result = do_query($dbh, $statement);
+	}
  	return $result;	
 }
 




More information about the MOBY-guts mailing list