代码之家  ›  专栏  ›  技术社区  ›  Sai Prasad

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

  •  0
  • Sai Prasad  · 技术社区  · 7 年前

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

    Normals查询工作得很好,但是当我使用$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.
    

    我很困惑在哪里启用这个功能,有人能帮忙吗?

    1 回复  |  直到 7 年前
        1
  •  2
  •   Gaurav Mantri    7 年前

    我不知道在哪里启用这个功能。

    简单的答案是你不能。

    Azure表对OData查询选项的支持有限,它只支持 $filter ,请 $select $top 查询选项。

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