[MOBY-guts] biomoby commit
Dennis Wang
dwang at pub.open-bio.org
Wed Jul 27 22:57:47 UTC 2005
dwang
Wed Jul 27 18:57:47 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby
In directory pub.open-bio.org:/tmp/cvs-serv31305/Perl/MOBY/Adaptor/moby
Modified Files:
queryapi.pm
Log Message:
and again
moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.21,1.22
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/07/27 21:26:52 1.21
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/07/27 22:57:47 1.22
@@ -414,14 +414,54 @@
#
# object table functions
#
+=head2 query_object
+
+ Title : query_object
+ Usage : my $un = $API->query_object(%args)
+ Function : Executes a query for objects in the database
+ Args : type => String - lsid or a term identifying a particular object
+ Returns : listref of hashrefs:
+ [{object_id => Integer,
+ object_lsid => String,
+ object_type => String,
+ description => String,
+ authority => String,
+ contact_email => String}]
+ Notes : Only allows querying by lsid or type term
+=cut
sub query_object{
die "query_object not implemented in adaptor\n";
}
+=head2 insert_object
+
+ Title : insert_object
+ Usage : my $un = $API->insert_object(%args)
+ Function : Inserts an object into the database
+ Args : object_type => String,
+ object_lsid => String,
+ description => String,
+ authority => String,
+ contact_email => String
+ Returns : Integer insertid
+ Notes : the fact that it returns an insertid is bad since this
+ is only useful to an SQL-based API...
+=cut
sub insert_object{
die "insert_object not implemented in adaptor\n";
}
+=head2 delete_object
+
+ Title : delete_object
+ Usage : my $un = $API->delete_object(%args)
+ Function : Deletes an object and any relationships it has from the database
+ Args : type => String - lsid or term identifying a particular object
+ Returns : ($err, $errstr)
+ $err = 1 if there was an delete error, 0 if successful
+ $errstr = String error message if there was an error
+
+=cut
sub delete_object{
die "delete_object not implemented in adaptor\n";
}
@@ -429,6 +469,20 @@
#
# object_term2term table functions
#
+=head2 query_object_term2term
+
+ Title : query_object_term2term
+ Usage : my $un = $API->query_object_term2term(%args)
+ Function : Executes a query for object relationships in the database
+ Args : type => String - lsid or a term identifying a particular object
+ Returns : listref of hashrefs:
+ [{assertion_id => Integer,
+ relationship_type => String,
+ object1_id => Integer,
+ object2_id => Integer,
+ object2_articlename => String}]
+ Notes : Only allows querying by lsid or type term
+=cut
sub query_object_term2term{
die "query_object_term2term not implemented in adaptor\n";
}
@@ -437,7 +491,7 @@
Title : insert_object_term2term
Usage : my $un = $API->insert_object_term2term(%args)
- Function : Inserts a object relationship into the database
+ Function : Inserts an object relationship into the database
Args : relationship_type => String,
object1_id => Integer, - but may be string if lsid?
object2_id => Integer, - but may be string if lsid?
More information about the MOBY-guts
mailing list