Skip to content

[request]: impl From for types contained in aws_sdk_dynamodb::model::AttributeValue #482

Open
@simonvandel

Description

@simonvandel

A note for the community

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment

Tell us about your request

  • Implement From for AttributeValue for common types
    • Blob -> AttributeValue::B
    • bool -> AttributeValue::Bool
    • Vec -> AttributeValue::Bs
    • Vec -> AttributeValue::L
    • HashMap<String, AttributeValue>, AttributeValue::M
    • all number types -> AttributeValue::N
    • Vec -> AttributeValue::Ns
    • String -> AttributeValue::S
    • Vec -> AttributeValue::SS
    • (I left out AttributeValue::Null since that would conflict with AttributeValue::Bool)
  • Let all methods that currently take AttributeValue instead take Into<AttributeValue>

That will allow methods such as expression_attribute_values to be used like this

expression_attribute_values(":name", "some name".to_string())

instead of the current

expression_attribute_values(":name", AttributeValue::S("some name".to_string()))

Tell us about the problem you're trying to solve.

Make constructing AttributeValues more ergonomic.

Are you currently working around this issue?

Converting to AttributeValue manually.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.high-level-libraryp2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions