Fix AttributeValue marshaling and names in expressions #1590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates the
attributevalue
andexpression
package's handling ofAttributeValue marshaling fixing several bugs in the packages.
Fixes Inconsistent struct field name marshaled. Fields will now
be consistent with the EncoderOptions or DecoderOptions the Go struct
was used with. Previously the Go struct fields would be cached with
the first options used for the type. Causes subsequent usages to have
the wrong field names if the encoding options used different TagKeys.
Fixes Support more than string types for map keys. Updates
(un)marshaler to support number, bool, and types that implement
encoding.Text(Un)Marshaler interfaces.
Fixes Support for expression Names with literal dots in name. Adds new
function
NameNoDotSplit
to expression package. This function allowsyou to provide a literal expression Name containing dots. Also adds a
new method to NameBuilder,
AppendName
, for joining multiple name pathcomponents together. Helpful for joining names with literal dots with
subsequent object path fields.
Fixes bug with AttributeValue marshaler struct tag usage that caused
encoder option's
TagKey
to be ignored if the member also had a struct tag withdynamodbav
. Now both tags will be read as documented, with theTagKey
struct tag options taking precedence.