Don't indirect map values
We already have reference behaviour, so this is not necessary. This change highlighted fairly baroque architecture in mql that deserves some attention; the use of channels is somewhat confusing. Also rename LastResult to Result.
This commit is contained in:
parent
b89d4f392c
commit
a1453da84e
15 changed files with 59 additions and 57 deletions
|
|
@ -73,19 +73,19 @@ func (it *And) SubIterators() []graph.Iterator {
|
|||
|
||||
// Overrides Base TagResults, as it needs to add it's own results and
|
||||
// recurse down it's subiterators.
|
||||
func (it *And) TagResults(out *map[string]graph.TSVal) {
|
||||
it.Base.TagResults(out)
|
||||
func (it *And) TagResults(dst map[string]graph.TSVal) {
|
||||
it.Base.TagResults(dst)
|
||||
if it.primaryIt != nil {
|
||||
it.primaryIt.TagResults(out)
|
||||
it.primaryIt.TagResults(dst)
|
||||
}
|
||||
for _, sub := range it.internalIterators {
|
||||
sub.TagResults(out)
|
||||
sub.TagResults(dst)
|
||||
}
|
||||
}
|
||||
|
||||
// DEPRECATED Returns the ResultTree for this iterator, recurses to it's subiterators.
|
||||
func (it *And) ResultTree() *graph.ResultTree {
|
||||
tree := graph.NewResultTree(it.LastResult())
|
||||
tree := graph.NewResultTree(it.Result())
|
||||
tree.AddSubtree(it.primaryIt.ResultTree())
|
||||
for _, sub := range it.internalIterators {
|
||||
tree.AddSubtree(sub.ResultTree())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue