compare (orderBy, index, a, b) {
    const def = orderBy[index]
    let cA = utils.get(a, def[0])
    let cB = utils.get(b, def[0])
    if (cA && utils.isString(cA)) {
      cA = cA.toUpperCase()
    }
    if (cB && utils.isString(cB)) {
      cB = cB.toUpperCase()
    }
    if (a === undefined) {
      a = null
    }
    if (b === undefined) {
      b = null
    }
    if (def[1].toUpperCase() === 'DESC') {
      const temp = cB
      cB = cA
      cA = temp
    }
    if (cA < cB) {
      return -1
    } else if (cA > cB) {
      return 1
    } else {
      if (index < orderBy.length - 1) {
        return this.compare(orderBy, index + 1, a, b)
      } else {
        return 0
      }
    }
  }
The comparison function used by the {@link Query} class.

@method Query#compare
@param {array} orderBy An orderBy clause used for sorting and sub-sorting.
@param {number} index The index of the current orderBy clause being used.
@param {*} a The first item in the comparison.
@param {*} b The second item in the comparison.
@returns {number} -1 if `b` should preceed `a`. 0 if `a` and `b` are equal.
1 if `a` should preceed `b`.
@since 3.0.0