[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at dev.open-bio.org
Tue Jan 30 00:26:18 UTC 2007


mwilkinson
Mon Jan 29 19:26:18 EST 2007
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi
In directory dev.open-bio.org:/tmp/cvs-serv32571/MOBY/Adaptor/moby/queryapi

Modified Files:
	mysql.pm 
Log Message:
adding behaviour to return all services if no criterion are passed to findService
moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.80,1.81
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm	2007/01/22 20:56:34	1.80
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm	2007/01/30 00:26:18	1.81
@@ -121,19 +121,19 @@
 
 		for my $key (keys %pair)
 			{			
-	 			if (defined $pair{$key})
- 				{
- 					#added a check for servicename to support case sensitivity
- 					if ($key eq "servicename") {
- 						$condition .= $key . " LIKE binary ? ";
- 					} else {
- 						$condition .= $key . " = ? ";
- 					}
- 				push(@bindvalues, $pair{$key});
- 				}
- 				else
- 				{
- 				$condition .= $key . " IS NULL "
+	 			if (defined $pair{$key}){
+				    #added a check for servicename to support case sensitivity
+				    if ($key eq "servicename") {
+					$condition .= $key . " LIKE binary ? ";
+					push(@bindvalues, $pair{$key});
+				    } elsif ($pair{$key} eq "IS NOT NULL"){
+					$condition .= $key . " IS NOT NULL ";
+				    } else {
+				        $condition .= $key . " = ? ";
+					push(@bindvalues, $pair{$key});
+				    }
+ 				} else{
+				    $condition .= $key . " IS NULL "
  				}
 			}
 		}




More information about the MOBY-guts mailing list