Open guregu opened 1 month ago
An iterator for BatchGet that returns the table and item would be nice too (see also: #242). Although, you'd have to manually deserialize items if you have multiple types and need to switch on the table name, so it won't change things too much.
Here's an initial implementation of Go 1.23-style iterators for
Iter
andPagingIter
. Not sure yet if this would be the best API, or if it's useful 🤔It lets you write code like this
instead of this:
dynamo.SeqLEK
lets you dofor lastEvaluatedKey, item := range dynamo.SeqLEK(...)
.My thoughts are that it's kind of useful, but would probably be more useful as a method of a potential
Schema[T any]
type that stores information about the primary keys, etc (which is something I'd like to add eventually).Comments or ideas are welcome.