按分区键值过滤的 Azure 表

问题描述

我想在 partitionKey 等于一个值的 azure 表上过滤值。

var query = new azure.TableQuery().stringFilter('PartitionKey','eq',Tenant);
tableSvc.queryEntities(
    TABLE_VALUE,query,null,async function (error,result,response) {
    });

实际上我收到此错误

'(intermediate value).stringFilter is not a function'

解决方法

请参考以下代码:

var query = new azure.TableQuery().where('PartitionKey eq ?','Tenant');

更多详细信息,您可以参考此文档:

https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-nodejs#query-a-set-of-entities