gpt4 book ai didi

ios - 使用 Azure 的 readWithQueryString 调用时增加 fetchLimit 并对结果进行排序

转载 作者:行者123 更新时间:2023-11-28 08:44:57 26 4
gpt4 key购买 nike

我需要从我的 Azure 移动服务查询一些数据。到目前为止我所知道的是,我使用 MSQuery 调用,我可以更改 fetchLimitorderBy 但不能添加 systemProperties readWithQueryString 时,我能够获取这些 systemProperties,但无法更改获取限制或对结果进行排序。我猜您可以在使用 readWithQueryString 时添加更多查询参数,但我还没有找到任何有关如何执行此操作的信息。我正在使用 XCode 中的 swift 开发 IOS 应用程序。

这是使用一个允许您获取 systemProperties 的类,我无法将 orderBy 和 fetchLimit 更改添加到 URL:

itemTable.readWithQueryString("https://mymobileService.azure-mobile.net/tables/tableName?__systemProperties=createdAt") 

这将使用不允许您获取系统属性的查询类:

var query = itemTable.query()
query.fetchLimit = 300
query.orderByDescending("__createdAt")

提前致谢

最佳答案

在尝试了很多事情之后,我让它像这样工作:

itemTable.readWithQueryString("https://serviceName.azure-mobile.net/tables/TableName?__systemProperties=createdAt&$top=100&$orderby=__createdAt%20desc")

我几乎不得不猜测,因为 Azure 上没有太多这方面的文档。

关于ios - 使用 Azure 的 readWithQueryString 调用时增加 fetchLimit 并对结果进行排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35582372/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com