User:Jeroen De Dauw/Queries

Query object
Defines a query. Used by the query processor

Contains


 * One Description
 * Zero or more selection requests
 * Parameters such as limit and sort

QueryResult object
Defines the complete result of a query. Contains a tabular data structure.

QueryVisualization object
Defines how to visualize the result of a Query.

Contains


 * One pointer to result printer to use
 * Zero or more parameters for the result printer
 * Zero or more print requests (ie what info should be used from the query result)

Workflow for typical WD query and printer

 * A query object which only contains selection criteria, selection reqeusts and limit/sort/etc is created
 * The query object is fed to the query engine
 * The engine finds the matching entities via the store
 * If there are print requests, the engine fetches this info via the store as well
 * The query engine returns a result object (which is a data object, possibly immutable)
 * The result object gets stored/cached
 * People can specify different ways to visualize the result of the query and view them that way