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
|
||||
last string
|
||||
result graph.Value
|
||||
err error
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -267,7 +268,8 @@ func (it *Iterator) Next() bool {
|
|||
}
|
||||
if err != nil {
|
||||
glog.Errorf("Error fetching next entry %v", err)
|
||||
break
|
||||
it.err = err
|
||||
return false
|
||||
}
|
||||
if !skip {
|
||||
it.buffer = append(it.buffer, k.StringID())
|
||||
|
|
@ -288,6 +290,10 @@ func (it *Iterator) Next() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func (it *Iterator) Err() error {
|
||||
return it.err
|
||||
}
|
||||
|
||||
func (it *Iterator) Size() (int64, bool) {
|
||||
return it.size, true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue