Fix Err fallout for graph/iterator.HasA iterator
This commit is contained in:
parent
742277e72e
commit
bb5fd55e21
2 changed files with 45 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ type HasA struct {
|
|||
dir quad.Direction
|
||||
resultIt graph.Iterator
|
||||
result graph.Value
|
||||
err error
|
||||
runstats graph.IteratorStats
|
||||
}
|
||||
|
||||
|
|
@ -202,6 +203,9 @@ func (it *HasA) Next() bool {
|
|||
it.resultIt = &Null{}
|
||||
|
||||
if !graph.Next(it.primaryIt) {
|
||||
if err := graph.Err(it.primaryIt); err != nil {
|
||||
it.err = err
|
||||
}
|
||||
return graph.NextLogOut(it, 0, false)
|
||||
}
|
||||
tID := it.primaryIt.Result()
|
||||
|
|
@ -210,6 +214,10 @@ func (it *HasA) Next() bool {
|
|||
return graph.NextLogOut(it, val, true)
|
||||
}
|
||||
|
||||
func (it *HasA) Err() error {
|
||||
return it.err
|
||||
}
|
||||
|
||||
func (it *HasA) Result() graph.Value {
|
||||
return it.result
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue