Skip to content

Commit

Permalink
docstore/awsdynamodb: Ensure Next returns EOF when there are no more …
Browse files Browse the repository at this point in the history
…items
  • Loading branch information
bartventer authored Mar 21, 2024
1 parent 1f3e996 commit c3b220a
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
Original file line number Diff line number Diff line change
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.

Loading

0 comments on commit c3b220a

Please sign in to comment.