clarkie / dynogels

DynamoDB data mapper for node.js. Originally forked from https://github.com/ryanfitz/vogels
Other
490 stars 110 forks source link

feat: add consumed capacity to update response #33

Closed yoitsro closed 3 years ago

yoitsro commented 8 years ago

When updating an item, there is the option to return the consumed capacity. http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ReturnConsumedCapacity If it is returned, it is appended to the response under the ConsumedCapacity key.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.08%) to 98.551% when pulling d78139f6c6518bd9cb0514a432561b3e815fd592 on yoitsro:patch-1 into 6fc96c8b75fc125da0dd503f55f4c79fb3af6ee3 on clarkie:master.

clarkie commented 8 years ago

Thanks for your contribution. Could you add some usage documentation to support your change.

Thanks

yoitsro commented 8 years ago

Hey @clarkie. Check that out. Let me know if you need anything else.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.08%) to 98.551% when pulling 3365c98c69f57eab142a9d7ccee6ccd221096d4f on yoitsro:patch-1 into 6fc96c8b75fc125da0dd503f55f4c79fb3af6ee3 on clarkie:master.

clarkie commented 8 years ago

Ah ok, that makes sense. Would it be possible to add a test for this?

Thanks again for your contribution.

cdhowie commented 6 years ago

I am a bit hesitant to add this contextual information directly as a third parameter to the callback, for a few reasons:

jkav77 commented 6 years ago

I agree with @cdhowie that adding a third parameter to the callback function is suboptimal. This is inconsistent with the rest of the library's callback functions as well. Is there a different way to make this information available?

Also, couldn't you request consumed capacity for other database operations? Why just for update?