Fix Err fallout for graph/iterator.Comparison iterator

This commit is contained in:
Andrew Dunham 2015-04-14 17:21:12 -07:00
parent bb5fd55e21
commit 40cbbfcc1b
2 changed files with 23 additions and 0 deletions

View file

@ -51,6 +51,7 @@ type Comparison struct {
val interface{}
qs graph.QuadStore
result graph.Value
err error
}
func NewComparison(sub graph.Iterator, op Operator, val interface{}, qs graph.QuadStore) *Comparison {
@ -133,9 +134,16 @@ func (it *Comparison) Next() bool {
return true
}
}
if err := graph.Err(it.subIt); err != nil {
it.err = err
}
return false
}
func (it *Comparison) Err() error {
return it.err
}
// DEPRECATED
func (it *Comparison) ResultTree() *graph.ResultTree {
return graph.NewResultTree(it.Result())