Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Bio::DB::SQL::BioQuery
Object representing a query on a bioperldb

Bio::DB::SQL::BioQuery - Object representing a query on a bioperldb


NAME

Bio::DB::SQL::BioQuery - Object representing a query on a bioperldb


SYNOPSIS


  $q = Bio::DB::SQL::BioQuery->new;

  $q->where(["AND", "attA=x", "attB=y", "attC=y"]);

  $adaptor->fetch_by_query($q);


DESCRIPTION

A BioQuery is a high level query on a biological database. It allows queries to be specified regardelss of the underlying schema. Although a BioQuery can be translated into a corresponding SqlQuery or series of SqlQuerys, it is not always desirable to do so; rather the BioQuery should be translated into SqlQuerys one at a time, the SqlQuery executed and the results fed back to the BioQuery processor.

It is the job of the various adaptors to turn BioQuerys into resulting Bio objects via these transformations.

A BioQuery can be specified either as a text string which is converted into a BioQuery object via some grammar, or the object can be created and manipulated directly. The text string would be some kind of sqlesque language, one can imagine different languages with different grammars.

Other than being more high level, a BioQuery differs from a SqlQuery in that it is object based, not table based.

the BioQuery is a schema independent repesentation of a query; it may or may not be tied to the bioperl object model.


STATUS

There is no parser to turn statements like


  "FETCH Seq.* from Seq where species='Human'"

into a BioQuery object; objects have to be built manually

At the moment, everything in this object apart from the query constraints (the $bioquery->where() method) are ignored.


CONTACT

Chris Mungall <cmungall@fruitfly.org>


APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

new


  Usage:  $bioq = $self->new("SELECT bioentry.* FROM bioentry WHERE species='Human'");  # NOT IMPLEMENTED

      OR  $bioq = $self->new(-select=>["att1", "att2"],

                             -where=>["att3='val1'", "att4='val4'"]);

      OR  $bioq = $self->new(-where=>{species=>'human'});

  Args: objects, where, select, order, group

all arguments are optional (select defaults to *)

the arguments can either be array references or a comma delimited string

the where argument can also be passed as a hash reference

the from/objects array is optional because this is usually derived from the context eg the database adapter used. if used outside this context the object is required.

querytype


  Usage:  $query->querytype($val);      # setting

      OR   return $query->querytype();  # getting

one of : select, select distinct, insert, update, delete

ignored for now...

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy