clarkie / dynogels

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

Add etag support #21

Closed mwawrusch closed 8 years ago

mwawrusch commented 8 years ago

It would be nice to automatically create an etag field (_etag) similar to the timestamps, based on the contents of the document (https://www.npmjs.com/package/etag). Might be a bit complicated for updates as it would require a read first though.

clarkie commented 8 years ago

Could you add some details as to how you'd expect this to work?

My gut feeling is that storing an etag along with the body would not be right as that would then invalidate the etag. If you want it generated on the fly on reads then I'd say that isn't the concern of this library and should be handled by your web framework layer (e.g. hapi, express, etc.)

clarkie commented 8 years ago

Closing due to lack of update