veyron/services/store/memstore/query: Finish subquery implementation.
While we want clients to see the results of a subquery inline
with the parent result, we have to stream them separately.
selectionEvaluator embeds a channel of results in the parent
result object, and evalIterator sends the results to the client
out of line. In the parent, evalIterator replaces the channel
with a NestedResult value. After sending the parent to the client,
evalIterator sends the nested results. evalIterator maintains
a stack of channels, making it essentially an iterator of iterators.
This change removes the monotonicInt type. I found it easier to
have evalIterator maintain the NestedResult value because it
needs this value for both the parent and the nested results.
The previous code stored the value in the nested results, but
then it was hard to set the value in the parent.
Change-Id: I55e87710fa629a37d2c729166a030d2b56332ed4
4 files changed