Search code examples
quickblox

Quickblox - Join objects into one query


Is it possible for me to do an equivalent of a sql join on objects in quickblox so that i can get all of my information back in one api call?

For example:

If i have a custom object called purchases this may have details about a purchase but also will contain the user_id.

Can I do one call based on the purchase id and bring back the details of the user at the same time, i.e. join the tables on user_id?

Currently i'm having to do multiple calls on different objects to populate my page.

This is especially noticeable when i have a list of purchases, each with a different user that would need further api calls.

Thanks for any info


Solution

  • At the moment QuickBlox doesn't provide 'JOIN' like operator in CustomObjects module. You should do 2 separate queries.

    Instead of implementing JOIN query we are going to provide ability to upload queries code to server, so server will return result off all your scripts.

    At the moment you can do 2 separate queries: - request all messages - choose user_ids and request users by users ids