[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Wed Jul 27 14:26:44 UTC 2005
mwilkinson
Wed Jul 27 10:26:44 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi
In directory pub.open-bio.org:/tmp/cvs-serv28939/MOBY/Adaptor/moby/queryapi
Modified Files:
mysql.pm
Log Message:
extra and in autogenerated SQL
moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.47,1.48
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/07/27 14:24:06 1.47
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/07/27 14:26:44 1.48
@@ -638,23 +638,12 @@
my ($self, %args) = @_;
my $dbh = $self->dbh;
- #my $authority_id;
- #if ($args{'authority_uri'}){ # need to transform URI to a row ID
- # my $result = $self->query_authority(authority_uri => $args{'authority_uri'});
- # return 0 unless @$result[0];
- # $authority_id = @$result[0]->{authority_id};
- # return 0 unless $authority_id;
- #}
- #delete $args{'authority_uri'}; # this can't be passed into the search since it doens't exist in the table
my @args;
while (my ($k, $v) = each %args){
push @args, ({$k => $v}, "and"); # format for the_add_condition subroutine
}
-# if ($authority_id){
-# push @args, ({authority_id => $authority_id}) ;
-# } else {
-# pop @args; # remove final "and"
-# }
+
+ if (keys(%args)){ pop @args;} # remove final "and"
my $statement = "select
service_instance_id,
More information about the MOBY-guts
mailing list