iOS - Pod Version 4.0b3
let userSearchQuery = DataQueryBuilder()
userSearchQuery!.setSortBy(["name ASC"])
userSearchQuery!.setPageSize(100)
var whereClauseArray: [String] = []
whereClauseArray.append("(isAdmin != TRUE OR isAdmin IS NULL)")
whereClauseArray.append("(isTestUser != TRUE OR isTestUser IS NULL)")
whereClauseArray.append("(isUserSearchable = TRUE)")
whereClauseArray.append("(name LIKE '%\(searchString)%' OR lastname LIKE '%\(searchString)%' OR email LIKE '%\(searchString)%')")
if let usersToExclude: [String] = project.members?.map({ ($0.user?.objectId as String?)! }) {
whereClauseArray.append("(objectId NOT IN ('\( usersToExclude.joined(separator: "','") )'))")
}
userSearchQuery!.setWhereClause(whereClauseArray.joined(separator: " AND "))
let dataStore = self.backendless?.data.ofTable("Users")
dataStore?.find(
userSearchQuery!,
response: { ( response) -> () in
},
error: { (fault: Fault?) -> Void in
}
)
The results returned seem to be 10, in a random/unspecified order, from the user table