Sort data collection

let queryBuilder = DataQueryBuilder()
   queryBuilder.setWhereClause(whereClause: "age > 20")
   queryBuilder.setSortBy(sortBy:[“created DESC”])
   people = BackendlessDataCollection(entityType: Person.self, queryBuilder: queryBuilder)

in above code can i use sort method
BackendlessDataCollection only accepts WhereClause

am new in ios
did i miss something or i need course in ios :slight_smile:

Hi @paper_work

everything seems good, do you have any errors with this request?

Btw, here is a doc https://backendless.com/docs/ios/data_sorting.html

Regards, Vlad

the second parameter queryBuilder not work
only WhereClause work as String value

i think every thing is ok
but why i cant use queryBuilder with BackendlessDataCollection ?

thanks Vladimir

oh, I see

Unfortunately, BackendlessDataCollection is work in progress and it’s not documented yet, so signatures might be changed and I don’t recommend you to use it while the official is not released.

For retrieving data use DataService from the doc:
https://backendless.com/docs/ios/data_sorting.html

Regards, Vlad

good to tell me that

thank you