- AUTHOR - Hilmar Lapp
Bio::DB::Query::DBQueryResult - DESCRIPTION of Object
Give standard usage here
This modules provides an implementation of Bio::DB::Query::QueryResultI for database queries through DBI.
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated.
firstname.lastname@example.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:
Email hlapp at gmx.net
Describe contact details here
Additional contributors names and emails here
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Title : new Usage : my $obj = Bio::DB::Query::DBQueryResult->new(); Function: Builds a new Bio::DB::Query::DBQueryResult object Returns : an instance of Bio::DB::Query::DBQueryResult Args : named parameters -sth the statement handle (this object will not execute it) -adaptor the persistence adaptor (basically needs to implement instantiate_from_row($row, $factory) -factory optionally, the object factory to pass to the adaptor -num_fks the number of foreign key object columns in the rows -flat_only whether to retrieve and attach children when building objects (default: false) If none of these are given at instantiation, at least sth() and persistence_adaptor() must be set prior to calling next_object().
Title : next_object Usage : Function: Obtain the next object from the result stream and return it. Example : Returns : A Bioperl object (implementing at least Bio::Root::RootI) Args : none
Title : each_Object Usage : Function: This is primarily a convenience method and in most implementations will just loop over next_object() and return an array of all objects. Example : Returns : A reference to an array of objects. Args : Optionally, an anonymous function for filtering objects. If given, the function is passed one argument, the object to evaluate. The object will be included in the returned array if the function returns TRUE, and rejected otherwise.
Title : finish Usage : Function: Indicate being finished with this result so that possibly used system resources can be released. Example : Returns : none Args : none
Title : sth Usage : $obj->sth($newval) Function: Get/set statement handle from which to fetch the next row. This can be changed at any time. If changed, it means the next call to next_object() will fetch from the new handle. Also, the caller needs to finish() the previous handle if necessary (i.e., if not exhausted). Note that this object will not execute the statement handle. The caller needs to ensure that has been happened until next_object() is called. Example : Returns : value of sth (a DBI statement handle) Args : new value (a DBI statement handle, optional)
Title : persistence_adaptor Usage : $obj->persistence_adaptor($newval) Function: Get/set the instantiation adaptor to which to delegate object instantiation from an array of row values. The adaptor can be any object that implements instantiate_from_row() with two arguments, a reference to an array of column values, and optionally an object factory. This can be changed at any time with no adverse side effect other than the kind of object built possibly changing. Example : Returns : value of persistence_adaptor (an object) Args : new value (an object, optional)
Title : object_factory Usage : $obj->object_factory($newval) Function: Get/set the object factory to pass to the instantiation adaptor. Setting this is optional because providing it to the instantiation adaptor is optional. Example : Returns : value of object_factory (a Bio::Factory::ObjectFactoryI compliant instance) Args : new value (a Bio::Factory::ObjectFactoryI compliant instance, optional)
Title : num_fks Usage : $obj->num_fks($newval) Function: Get/set the number of foreign key columns in a given result row. Setting this correctly is only important for query results for which the resulting objects must have the foreign key objects attached. Example : Returns : value of num_fks (a scalar) Args : new value (a scalar, optional)
Title : flat_retrieval Usage : $obj->flat_retrieval($newval) Function: Get/set whether objects should be retrieved and built flat or with all their dependent objects fetched and attached. The default is to build full objects with all children attached which provides for no bad surprises when inspecting the results. However, building flat objects by disregarding children is potentially a lot faster, so this option is useful if, for instance, for a sequence you don't need any annotation or features. Example : Returns : value of flat_retrieval (a scalar evaluating to true or false) Args : on set, new value (a scalar or undef, optional)