function _extractQueryStr(fn, fnName, spec, ctx, args) {
  let queryStr = spec.query
  if (this.isNumber(queryStr)) {
    const queryIdx = this.normalizeIndex(args.length, queryStr)
    if (queryIdx === null) {
      this.logger.debug('Invalid query index %d of %d', queryStr, args.length)
      return null
    }
    queryStr = args[queryIdx]
  } else if (this.isFunction(queryStr)) {
    queryStr = queryStr.call(ctx, this, fn, fnName, args)
  }

  return queryStr
}
Extracts the query string from the arguments according to the given spec.

- `_extractQueryStr(fn, fnName, spec, ctx, args)`

@private
@this DatastoreShim
@param {Function}  fn      - The query function to be executed.
@param {string}    fnName  - The name of the query function.
@param {QuerySpec} spec    - The query spec.
@param {*}         ctx     - The context of the query function's execution.
@param {Array}     args    - The arguments for the query function.
@returns {?string} The query from the arguments if found, otherwise `null`.