Udostępnij za pośrednictwem


One Rowset for Each Hierarchy Level

The result of the preceding command contains three rowsets. Each rowset represents a complete hierarchy level in the result. The root rowset ? the rowset returned from ICommand::Execute, which we call the Customer rowset ? contains columns cust_no, cust_name, and city, as well as a chaptered column named order_rows. The second rowset, which we call the Orders rowset, contains columns ord_no, ord_date, and total, as well as a chaptered column named item_rows. Finally, the third rowset, which we call the Items rowset, contains columns item_no, description, quantity, unit_price, and ext_price.

A single rowset may apply to more than one level of a recursive set of objects, but the specification also uses recursion so that the rowset is defined only once in the specification and all bookmarks or chapters refer to that. Hence there is only one rowset at execution time.