How to use Windows Azure Table Storage Timestamp or Etag field

前端 未结 2 1885
攒了一身酷
攒了一身酷 2021-01-07 02:23

I am developing a node.js application on Windows Azure Websites (IISNode) and have installed the Azure SDK module for node.js my question is how to use the etag or timestamp

2条回答
  •  半阙折子戏
    2021-01-07 03:15

    The ETag is used for optimistic concurrency during updates. The ETag is set automatically when you retrieve an entity and is uploaded automatically when you update that queried entity. The update would fail if the entity has in the meantime been updated by another thread. The updateEntity method has an optional parameter, checkEtag, that can be used to modify this behavior by allowing you to specigy that the update should succeed regardless of whether or not another thread has updated the record - thereby overriding the optimistic concurrency.

    The Windows Azure Storage Service REST API is the definitive interface to Windows Azure Storage, and htis is the documentation to go to when you want to understand the API capabilities of the service. The documention describing ETag, in general, is here.

提交回复
热议问题