Back

Is there a way for me to fetch the result of +1 from a table without having to perform a listDocumen

  • 0
  • Databases
  • Web
Emerson
19 Jan, 2024, 09:03

Is there a way for me to fetch the result of +1 from a table without having to perform a listDocument one by one?

TL;DR
User wants to know if there's a way to fetch the result of +1 from a table without having to perform a listDocument one by one. There are a few options available: using relationships, optimizing requests, caching with localStorage or server-side caching using Appwrite Functions. The user confirms understanding and thanks for the help.
Meldiron
19 Jan, 2024, 09:06

Hi 👋 What do you mean by fetching result of +1? Do I understand correctly you need this to know if there is next page?

Emerson
19 Jan, 2024, 09:07

I mean to bring the result from more than one collection at once, instead of fetching one by one. Is it possible? @Meldiron

Meldiron
19 Jan, 2024, 09:10

I see. In some scenarios you can use relationships. If an attribute is of type relationship, you automatically get the whole related document. If you cannot use relationships, in most scenarios you can optimize requests to only send as many requests, as many collections you have. This may mean 3 or 4 requests, but that shouldnt take too long. Last option would be to cache, if your queries dont fit into any of those categories. You can achieve client-side caching with localStorage or server-side caching by using Appwrite Functions

Emerson
19 Jan, 2024, 09:16

ohhh, thanks. my bad about taking up your time with such a simple question, haha. Thank you!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more