function setParser(parser) {
  if (this.isString(parser)) {
    const newParser = defaultParsers[parser]
    if (newParser) {
      this.queryParser = newParser
    } else {
      this.logger.debug(
        'Attempted to set the query parser to invalid parser %s, not setting new parser',
        parser
      )
    }
  } else if (this.isFunction(parser)) {
    this.queryParser = parser
  } else {
    this.logger.trace('Received invalid parser (%s)', parser)
  }
}
Sets the query parser used by this shim instance.

@memberof DatastoreShim.prototype
@param {string|QueryParserFunction} parser
 The string used to look up a default parser or the function used to parse
 queries. It is recommended that you use one of the well-known constants if
 available in the {@link DatastoreShim.QUERY_PARSERS}.
@see DatastoreShim.QUERY_PARSERS
@see QueryParserFunction
@see ParsedQueryData