Appwrite文档的随机列表

huangapple go评论40阅读模式
英文:

Appwrite Random list of Documents

问题

我目前正在开发Appwrite,作为我的工作的一部分,我遇到了一个问题。我想随机检索文档。这是否可能?谢谢。

我尝试使用限制和偏移来实现,但未成功。

英文:

I am currently working on Appwrite, and as part of my work, I am facing an issue. I would like to retrieve documents randomly. Is it possible to achieve that? Thank you.

I was trying through the use of limit and offset.
but not work

答案1

得分: 0

这是不可能的,除非您使用特定ID的筛选器进行查询,然后您需要知道每个ID,或者查询它们所有(通过分页循环进行总数计算),然后从您构建的列表中随机选择。

英文:

This is not possible, unless you were to query using filters for specific ids, then you would need to know every id, or query for them all (looping through pagination for totals) then picking random from the list you built.

huangapple
  • 本文由 发表于 2023年5月22日 14:23:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76303491.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定