Skip to content

Commit

Permalink
Move the where for Swift 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Jan 17, 2022
1 parent 3a15233 commit e12b88f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/ParseSwift/Protocols/ParseQueryScorable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public protocol ParseQueryScorable {
}

// MARK: ParseQueryScorable
extension Query {
extension Query where T: ParseObject & ParseQueryScorable {
/**
Method to sort the full text search by text score.
- parameter value: String or Object of index that should be used when executing query.
- note: Your `ParseObject` should conform to `ParseQueryScorable` to retrieve
the weight/rank via the "score" property of your `ParseObject`.
*/
public func sortByTextScore() -> Query<T> where T: ParseObject & ParseQueryScorable {
public func sortByTextScore() -> Query<T> {
var mutableQuery = self
let ascendingScore = Order.ascending(QueryConstraint.Comparator.score.rawValue)
if mutableQuery.order != nil {
Expand Down

0 comments on commit e12b88f

Please sign in to comment.