Skip to content

Conversation

@danielpanzella
Copy link

Looks like the code for reading maps from DynamoDB was added recently, but it fails when storing nested objects. This seems to make it work for me.

@gregory
Copy link

gregory commented May 8, 2018

Dynamite will almost always comply with the latest DynamoDB spec on Amazon

Is this accurate @xiao @eduardoramirez ? :)

@eduardoramirez
Copy link
Contributor

hey @gregory, yes it should for the most part be compliant. Of course, there will be features that we don't use at Medium that are not implemented though.

} else {
throw new Error('Invalid dynamo set value. Type: ' + firstItemType + ', Value: ' + value[0])
}
} else if (typeof value == "object") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this condition to the top level switch?

"kew": "0.7.0",
"typ": "0.6.3",
"aws-sdk": "2.2.47"
"aws-sdk": "2.5.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason here why we're updating the sdk?

Copy link
Author

@danielpanzella danielpanzella Aug 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, but this is something I did 2 years ago while implementing something for a former client, and I don't honestly recall the context here. If this PR is useful to others I can try and setup something to test it with the previous aws-sdk and see what happens, but I cannot promise when I will have time to do so.

Please consider this a response to all three of your questions.

default:
if (Array.isArray(value)) {
if (value.length == 0)
return {L: []}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the implications here if the type of this list isn't of attributes?

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.

3 participants