Ferreteria/v2/usage/SQO: Difference between revisions
< Ferreteria | v2 | usage
Jump to navigation
Jump to search
(Created page with "==About== Structured query objects (SQOs) allow classes to define the best way of implementing various parts of more complicated queries without having to define the entire qu...") |
(No difference)
|
Revision as of 19:38, 16 March 2017
About
Structured query objects (SQOs) allow classes to define the best way of implementing various parts of more complicated queries without having to define the entire query. Each SQO class represents part of an SQL statement; an executable SQO allows modification of its internals.
Classes
- fcSQL_base_element: this should probably be rewritten as an interface, because that's pretty much what it is: ensures that every object in a SQO hierarchy will have certain methods.
- fcSQL_Query: renders executable SQL. Includes a SELECT SQO and an optional TERMS SQO.
- fcSQL_Select: has a SOURCE and FIELDS (which defaults to '*')fcSQL_SourceSingle
- fcSQL_Fields: list of fields (each array element may specify an alias)
- fcSQL_Source: abstract base class for SOURCE types
- fcSQL_SourceSingle: abstract base class for single-item (non-JOIN) sources
- fcSQL_TableSource: a table source
- fcSQL_SubQuerySource: source consisting of an executable SELECT wrapped in parentheses
- fcSQL_JoinSource: source that joins two or more other sources together
- AddElement(fcSQL_JoinElement $oJoin)
- AddElements(array $ar)
- fcSQL_SourceSingle: abstract base class for single-item (non-JOIN) sources
- fcSQL_Terms: collects filtering, sorting, and grouping term objects (WHERE, ORDER BY, GROUP BY)
- fcSQL_Term: abstract base class for TERM classes
- fcSQLt_Filt: filtering (WHERE) term
- fcSQLt_Sort: sorting (ORDER BY) term
- fcSQLt_Group: grouping (GROUP BY) term
- fcSQL_JoinElement: component for a JOIN