4

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

Martyn Joyce
  • 374
  • 1
  • 10

1 Answers1

1

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

Rubycon
  • 18,156
  • 10
  • 49
  • 70
  • 3
    About the custom server-side script functionality, when will it be available? I am looking to sort custom objects by finding the degree of intersection between an array field of a custom object and the query array. (Am I making myself understood? I find my English limiting here.) Is that something that can be implemented as of now or is that something that would be capable of doing in the server script? Or is that not supported altogether? – huggie Dec 24 '13 at 07:46
  • 1
    I'm curious about the question that @huggie asked in his comment above as well. – user3344977 Jun 07 '15 at 20:25