The Query Tree is generated by the Parser from the Token Tree. The Syntax of the Query is already checked at this point and several operations have been eliminated for the Query to work. The Query Tree has an Object Context given by the Class Index for that object (using the abstract)
Leaf Node: | Predicate Tree. | P |
NonLeaf Nodes: | Association Query | A |
Bag Query | B | |
Intersect | I | |
Union | U | |
Except / Difference | E |
Class Index | All |
Distinct Flag | All NonLeaf Nodes |
Pointer to Children | All NonLeaf Nodes |
Predicate String | A, B |
Association Name | A |
Predicate Tree Object | P |
Intersection Object | P |
Name | Alias |
sxpPCatObject | pobj |
sxpPCatField | pfld |
sxpPCatRun | prun |
sxpPCatDescriptor | pdes |
sxpSCatObject | sobj |
sxpSCatTarget | stgt |
A Distinct Flag on every NonLeaf Node tells us whether a Bag or a Set should be the result of the operation.
The Predicate String is only needed for the Bag and Association Queries because they operate on an incoming bag.
The Association Name defines the Member Chain for the Association Query.
The Predicate Tree and Intersection objects are explained below.
For the details of the class structure and the format of the input/output stream consult the appendix.
The binary nodes
The unary nodes