Backendless whereClause

can’t support find_in_set ?

Hi @user1 !

Unfortunately this function is not supported at the current moment. I have created an internal ticket BKNDLSS-26557 to add support for it. We reach you out when support for this function will be added.
I hope you will enjoy further work with Backendless.

Regards, Andriy

Hi, @user1

We have just updated our servers with the latest changes, including the functionality you asked us about earlier - FindInSet function. With this query, you can search a comma-separated list of items for a specific item. The query returns a numeric value indicated where in the set the item is found.

For example, let’s say we are a shipping company and we store the items in each shipment in the description column as a string (items separated by commas, no spaces). If we want to find shipments including “product7”, we can use the following API GET request.
property=FindInSet('product7',description)
We will be returned the numeric position of the item or 0 if the item is not present. We will be returned the numeric position of the item or 0 if the item is not present.

Could you kindly let us know whether the function works for you well?

Regards,
Marina

Hi @Marina.Rudenko ,
Does this type of query imply a full table scan, or is there some indexing involved?
Regards

Hi, @Klaas_Klever

Only the requested column will be searched for. In the example I made above, the search would be for the column description the requested value is product7. We are planning to add this feature to our documentation, where we will describe other possible search examples using it.

Regards,
Marina

Hi @Marina.Rudenko ,
My question is more about performance and scaling behavior of FindInSet. How does the search time scale if I increase the number of records in my database table? If there is an index in place, the increase will be logarithmic. If no index is in place, it will be linear (or even worse). This is important to know if I’m expecting to have a huge number of records in my table.
In your example: would it help to create an index on the field description?
Regards,

Hi @Klaas_Klever ,

Unfortunately database do not use indexes for findInSet function call so you should be careful while using it.

Regards, Andriy