[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Thu Jul 28 21:26:59 UTC 2005
mwilkinson
Thu Jul 28 17:26:59 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi
In directory pub.open-bio.org:/tmp/cvs-serv5919/MOBY/Adaptor/moby/queryapi
Modified Files:
mysql.pm
Log Message:
query for collections was wrong
moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.62,1.63
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/07/28 21:13:16 1.62
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/07/28 21:26:59 1.63
@@ -269,6 +269,8 @@
my ($self, %args) = @_;
my ($siid) = $self->_getSIIDFromLSID($args{service_instance_lsid});
my $collid = $args{collection_input_id};
+ my $id_to_use = $siid?$siid:$collid;
+
my $dbh = $self->dbh;
my $statement = "select
@@ -282,10 +284,10 @@
my $condition;
$siid && ($condition = " service_instance_id = ? and collection_input_id IS NULL");
- $collid && ($condition = " service_instance_id IS NULL and collection_input_id = ?");
+ $collid && ($condition = " collection_input_id = ?");
$statement .= $condition;
- my $result = do_query($dbh, $statement, ($siid || $collid));
+ my $result = do_query($dbh, $statement, ($id_to_use));
return $result;
}
@@ -362,6 +364,7 @@
my ($siid) = $self->_getSIIDFromLSID($args{service_instance_lsid});
my $collid = $args{collection_output_id};
my $dbh = $self->dbh;
+ my $id_to_use = $siid?$siid:$collid;
my $statement = "select
simple_output_id,
@@ -373,11 +376,11 @@
from simple_output where ";
my $condition;
$siid && ($condition = " service_instance_id = ? and collection_output_id IS NULL");
- $collid && ($condition = " service_instance_id IS NULL and collection_output_id = ?");
+ $collid && ($condition = " collection_output_id = ?");
$statement .= $condition;
- my $result = do_query($dbh, $statement, ($siid || $collid));
+ my $result = do_query($dbh, $statement, ($id_to_use));
return $result;
}
More information about the MOBY-guts
mailing list