Fix Err fallout for graph/gaedatastore iterator
This commit is contained in:
parent
bd2b2b73cf
commit
5c9979ec8b
1 changed files with 7 additions and 1 deletions
|
|
@ -41,6 +41,7 @@ type Iterator struct {
|
||||||
offset int
|
offset int
|
||||||
last string
|
last string
|
||||||
result graph.Value
|
result graph.Value
|
||||||
|
err error
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -267,7 +268,8 @@ func (it *Iterator) Next() bool {
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Error fetching next entry %v", err)
|
glog.Errorf("Error fetching next entry %v", err)
|
||||||
break
|
it.err = err
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
if !skip {
|
if !skip {
|
||||||
it.buffer = append(it.buffer, k.StringID())
|
it.buffer = append(it.buffer, k.StringID())
|
||||||
|
|
@ -288,6 +290,10 @@ func (it *Iterator) Next() bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (it *Iterator) Err() error {
|
||||||
|
return it.err
|
||||||
|
}
|
||||||
|
|
||||||
func (it *Iterator) Size() (int64, bool) {
|
func (it *Iterator) Size() (int64, bool) {
|
||||||
return it.size, true
|
return it.size, true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue