Back

How to do the equivalent of a JOIN query in Appwrite?

  • 0
  • Databases
  • React Native
Adpa
8 Jan, 2025, 18:54

Hello,

I'm trying to get documents from a collection but I need to make sure that the document I pull is unique to another document in another collection. If it was sql, I would do a JOIN query but I don't know what's the equivalent in Appwrite. Thank you

TL;DR
- Appwrite does not have a JOIN feature implemented at this time. - A workaround suggested is using listDocuments with a filter to check if the related document exists. - Example: listDocuments with a filter like 'foreign_key = id' to verify the uniqueness of the documents.
Kenny
8 Jan, 2025, 18:58

There is no join in appwrite right now, you could do something like listDocuments where foreign_key = id to see if it exists already?

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