【发布时间】:2018-05-06 09:30:29
【问题描述】:
我正在使用 Azure 函数中的 azure-storagemodule 从我的 Azure 存储表中读取数据。
获取这样的行
var tableSvc = azure.createTableService();
var query = new azure.TableQuery().top(1000);
tableSvc.queryEntities('tablename', query, null, function(error, result, response) {
// work with result.entries
}
生成的对象看起来很奇怪,因为每个列的值都使用“_”键放入它自己的对象中,因此 JSON 看起来像这样:
{
"PartitionKey": {
"$": "Edm.String",
"_": "Keyname"
},
"RowKey": {
"$": "Edm.String",
"_": "Keyname"
},
"Title": {
"_": "The Item Title"
}
}
而不是我所期望的:
{
"PartitionKey": "Keyname",
"RowKey": "Keyname",
"Title": "The Item Title"
}
该表在 Azure 存储资源管理器中看起来很正常。这是正常的吗?或者我能以某种方式影响查询的输出吗?
【问题讨论】:
标签: node.js azure-storage azure-functions azure-table-storage