[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Wed Jul 20 22:34:49 UTC 2005
mwilkinson
Wed Jul 20 18:34:49 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi
In directory pub.open-bio.org:/tmp/cvs-serv26223/MOBY/Adaptor/moby/queryapi
Modified Files:
mysql.pm
Log Message:
can query authority by either URI or database id
moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.19,1.20
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/07/20 17:00:26 1.19
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm 2005/07/20 22:34:48 1.20
@@ -597,12 +597,13 @@
my $servicename = $args{'servicename'};
my $authURI = $args{'authority_uri'};
-
- my $result = $self->query_authority({authority_uri => $authURI});
- return [{}] unless @$result[0];
- my $id = @$result[0]->{authority_id};
- return [{}] unless $id;
-
+ my $id = $args{'authority_id'};
+ unless ($id){
+ my $result = $self->query_authority({authority_uri => $authURI});
+ return [{}] unless @$result[0];
+ my $id = @$result[0]->{authority_id};
+ return [{}] unless $id;
+ }
my $statement = "select
service_instance_id,
category,
More information about the MOBY-guts
mailing list