Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamodb/attributevalue: Support more than string types for map keys. #411

Closed
skmcgrail opened this issue Oct 3, 2019 · 1 comment · Fixed by #1590
Closed

dynamodb/attributevalue: Support more than string types for map keys. #411

skmcgrail opened this issue Oct 3, 2019 · 1 comment · Fixed by #1590
Labels
feature-request A feature should be added or improved.

Comments

@skmcgrail
Copy link
Member

skmcgrail commented Oct 3, 2019

Should DynamoDB AttributeValue (un)marshalers should support decoding into maps whose keys are comparable scalers?

Types that should be supported

  • String aliases
  • Scalars that can be convertible to string for attribute value map keys.
  • Types that implement the MarshalText() method.
@KaibaLopez KaibaLopez added the feature-request A feature should be added or improved. label Sep 22, 2020
@jasdel jasdel changed the title Should DynamoDB AttributeValue (un)marshaler extended support for decoding into maps with comparable keys other then string. dynamodb/attributevalue: Support map keys that are convertable to string Nov 11, 2020
@jasdel jasdel changed the title dynamodb/attributevalue: Support map keys that are convertable to string dynamodb/attributevalue: Support map keys that are convertible to string Nov 11, 2020
@jasdel jasdel changed the title dynamodb/attributevalue: Support map keys that are convertible to string dynamodb/attributevalue: Support more than string types for map keys. Nov 11, 2020
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this issue Feb 17, 2022
Updates the `attributevalue` and `expression` package's handling of
AttributeValue marshaling fixing several bugs in the packages.

* Fixes aws#1569 `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 aws#645, aws#411 `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 allows
  you to provide a literal expression Name containing dots. Also adds a
  new method to NameBuilder, AppendName, for joining multiple name path
  components together. Helpful for joining names with literal dots with
  subsequent object path fields.

* Fixes bug with AttributeValue marshaler struct struct tag usage that
  caused TagKey to be ignored if the member had a struct tag with
  `dynamodbav` struct tag. Now both tags will be read as documented,
  with the TagKey struct tag options taking precedence.
jasdel added a commit that referenced this issue Feb 22, 2022
Updates the `attributevalue` and `expression` package's handling of
AttributeValue marshaling fixing several bugs in the packages.

* Fixes #1569 `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 #645, #411 `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 allows
  you to provide a literal expression Name containing dots. Also adds a
  new method to NameBuilder, AppendName, for joining multiple name path
  components together. Helpful for joining names with literal dots with
  subsequent object path fields.

* Fixes bug with AttributeValue marshaler struct struct tag usage that
  caused TagKey to be ignored if the member had a struct tag with
  `dynamodbav` struct tag. Now both tags will be read as documented,
  with the TagKey struct tag options taking precedence.
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants