In the Backendless API you have the IN operator, can I apply NOT as NOT IN? Also, do you have a way query a list records results randomly?
Thanks,
Michael
In the Backendless API you have the IN operator, can I apply NOT as NOT IN? Also, do you have a way query a list records results randomly?
Thanks,
Michael
Hi @Michael_Iverson,
Yes, ‘NOT IN’ is also supported.
To get a random object from a table, you can apply the following algorithm:
pageSize=1
and offset=RESULT-OF-STEP2
.Hope this helps.
Regards,
Mark
What about random objects? Say like the 10 objects, all selected randomly based on a query?
Thanks,
Michael
We do not support this (yet). Out of curiosity, what is the use case that requires this functionality?
We promise to show, and explain when we complete our beta version. As for the multiple random objects, how soon will this be? We are expecting to handle rather large data sets,
Thanks,
Michael Iverson
For now that will do, I guess that will be an upgrade for later versions
Thanks,
Michael Iverson
Here’s a temporary workaround for you:
This approach may require you to re-run the entire query multiple times. Because the random numbers (id’s) you generate may not be the objects which match some-additional-query-conditions.
The approach is so-so. If you come up with a better idea, please let me know.
Cheers,
Mark
I might have an idea. Does code cloud supports threading?
Thanks
Michael Iverson
Yes
Another Question: Say i have array of classes using Swift’s arrays [Class B]. Class B, has a table on the backend. I want to do bulk save, can I save it as [Class B], or do I ned to make an array of JSON object?
Thanks,
Michael
When you use Backendless SDK, you can use classes which represent objects in the database. Here’s the doc for bulk save:
https://backendless.com/docs/ios/data_multiple_objects_bulk_create.html
Also, could you please create a new support topic for every new question? It will help you, us and many others who have similar questions find the answers. Thanks in advance.
Regards,
Mark