[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Thu Sep 22 16:23:13 UTC 2005


kawas
Thu Sep 22 12:23:13 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi
In directory pub.open-bio.org:/tmp/cvs-serv17475/Adaptor/moby/queryapi

Modified Files:
	mysql.pm 
Log Message:
added case sensitive servicename queries

moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.73,1.74
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm	2005/09/13 13:17:58	1.73
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm	2005/09/22 16:23:13	1.74
@@ -123,7 +123,12 @@
 			{			
 	 			if (defined $pair{$key})
  				{
- 				$condition .= $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
@@ -621,6 +626,7 @@
 }
 
 # pass servicename and authority_uri
+# TODO added LIKE binary here
 sub query_service_existence {
 	my ($self, %args) = @_;	
 	my $dbh = $self->dbh;
@@ -643,7 +649,7 @@
           description,
 		  signatureURL,
 		  lsid 
-          from service_instance where servicename = ? and authority_id = ?";
+          from service_instance where servicename LIKE binary ? and authority_id = ?";
  	my $final = do_query($dbh, $statement, ($servicename, $id));
  	if (@$final[0]){return 1} else {return 0}
 	




More information about the MOBY-guts mailing list