繁体   English   中英

关于Azure表存储中的表实体

[英]Regarding Table Entity in Azure table storage

我正在使用Java语言,并创建了一个从TableServiceEntity扩展的类。

public class GameLogsByHandGameId extends TableServiceEntity{

    private final String TABLE_NAME = "GameLogsByHandGameId";

    public GameLogsByHandGameId(String handId, String gameId) {
        this.partitionKey = handId;
        this.rowKey = gameId;
    }

    @Override
    public String getPartitionKey() {
        return this.partitionKey;
    }

    @Override
    public String getRowKey() {
        return this.rowKey;
    }

    public long getTableId() {
        return tableId;
    }

    public void setTableId(long tableId) {
        this.tableId = tableId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Override
    public String getTableName() {
        return TABLE_NAME;
    }

任何蓝色表实体都具有三个系统属性,PartitionKey,RowKey和Timestamp。

MSDN文档( https://msdn.microsoft.com/zh-cn/library/azure/dd179338.aspx )说:“服务器管理无法修改的时间戳记值”

我的实体中没有TimeStamp属性; 尽管服务器无论如何都会为每个实体将其插入表中。

虽然当我在表存储上看到我的实体时; 我看不到“时间戳记”列吗?

在此处输入图片说明

我需要启用它吗?

不,您不必启用此属性。 默认情况下它在那里。 如果您查看http://azure.github.io/azure-sdk-for-java/com/microsoft/azure/storage/table/TableServiceEntity.html上的TableServiceEntity文档。 您将看到此属性。 在Java SDK中称为timeStamp

创建或更新实体时,Azure表服务会设置“ Timestamp属性。 它表示创建/最后更新实体时的UTC日期/时间值。

至于为什么该列不可见,您使用的工具可能选择不显示此属性。 您可以尝试使用其他工具吗?

有一篇正式的文章列出了每个Azure存储浏览器,包括Microsoft和第三方提供商提供的资源,请参阅https://azure.microsoft.com/zh-cn/documentation/articles/storage-explorers/

正如@GauravMantri所说,请尝试使用本文中列出的其他工具。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM