Skip to content

Commit

Permalink
fix(docstore/awsdynamodb): ensure Next returns EOF when no more items
Browse files Browse the repository at this point in the history
  • Loading branch information
bartventer committed Mar 21, 2024
1 parent 1f3e996 commit daa25e8
Show file tree
Hide file tree
Showing 42 changed files with 3,060 additions and 2,209 deletions.
4 changes: 4 additions & 0 deletions docstore/awsdynamodb/query.go
Expand Up @@ -489,6 +489,10 @@ func (it *documentIterator) Next(ctx context.Context, doc driver.Document) error
}
it.curr = 0
}
// If there are no more items, return EOF.
if len(it.items) == 0 {
return io.EOF
}
if err := decodeDoc(&dyn.AttributeValue{M: it.items[it.curr]}, doc); err != nil {
return err
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit daa25e8

Please sign in to comment.