Azure 表存储 REST OData 不支持 $count 和 $orderby

标签 azure azure-storage

我正在努力通过来自 HTTP 客户端的基于 OData 的 REST 服务调用来调用 Azure 存储表。

正常查询效果很好,但是当我使用 $count、$inlinecount、$orderBy 查询时,出现以下异常。

The ability of the data service to return row count information is disabled. To enable this functionality, set the DataServiceConfiguration.AcceptCountRequests property to true.

The requested operation is not implemented on the specified resource.

我很困惑在哪里启用此功能,有人可以帮忙吗?

最佳答案

I am confused where to enabled this functionality.

简单的答案是你不能。

Azure Tables 对 OData 查询选项的支持有限,仅支持 $filter$select$top 查询选项。

您可以在这里阅读更多相关信息:https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-query-options

关于Azure 表存储 REST OData 不支持 $count 和 $orderby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51246190/

相关文章:

azure-storage - CryptoJS (HMAC Sha256) 给出不正确的输出?

azure - 无法使用 Azure CLI 模板创建 SendGrid 资源 - "Invalid subscription identifier provided"

c# - Application Insights 未收到任何数据

azure - 是否可以在保持 Azure 虚拟机完好无损的情况下降级高级存储订阅?

azure - 如何在 ASP.NET MVC 上使用 IHttpHandler 从 azure 存储帐户返回图像

.net - 使用适用于 .NET 的 Azure Blob 存储客户端库 v12 下载 Blob

azure - 如何使用 FileUpload 在 Azure Blob 中上传文件大小大于 1 GB 的 asp.net 文件

php - PHP和Redis缓存

azure - 从其他服务器的ORC文件创建Hive ORC表

Azure 监视器针对 CPU 使用率 > 80% 持续 30 分钟或更长时间发出警报