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

Accept #to_str attributes as Strings in dynamodb #937

Merged
merged 1 commit into from
Sep 29, 2015

Conversation

soulcutter
Copy link
Contributor

Unlike #to_s, #to_str is only implemented by classes that act like
strings. This change allows user-defined classes which provide that
conversion to be used directly by dynamodb clients and be treated as
String attributes.

For example, users may define a class which is a composite of two or
more values which are stored as a single String in dynamodb, and pass
instances of that class into dynamodb clients without need for explicit
conversion.

Unlike #to_s, #to_str is only implemented by classes that act like
strings. This change allows user-defined classes which provide that
conversion to be used directly by dynamodb clients and be treated as
String attributes.

For example, users may define a class which is a composite of two or
more values which are stored as a single String in dynamodb, and pass
instances of that class into dynamodb clients without need for explicit
conversion.
trevorrowe added a commit that referenced this pull request Sep 29, 2015
Accept #to_str attributes as Strings in dynamodb
@trevorrowe trevorrowe merged commit 4614763 into aws:master Sep 29, 2015
@trevorrowe
Copy link
Member

Looks good, thanks!

@soulcutter soulcutter deleted the stringy-dynamodb-attributes branch September 29, 2015 20:11
awood45 added a commit that referenced this pull request Sep 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants