function parseQuery(query, nodule) {
  const parsed = this.queryParser.call(nodule, query)

  let collection = parsed.collection
  // strip enclosing special characters from collection (table) name
  if (typeof collection === 'string' && collection.length > 2) {
    if (/^[[{'"`]/.test(collection)) {
      collection = collection.substring(1)
    }
    if (/[\]}'"`]$/.test(collection)) {
      collection = collection.substring(0, collection.length - 1)
    }
  }

  const queryRecorded =
    this.agent.config.transaction_tracer.record_sql === 'raw' ||
    this.agent.config.transaction_tracer.record_sql === 'obfuscated'

  return new ParsedStatement(
    this._metrics.PREFIX,
    parsed.operation,
    collection,
    queryRecorded ? parsed.query : null
  )
}
Parses the given query to extract information for any metrics that will be
created.

NOTE: Calling this method before {@link DatastoreShim#setDatastore}
will result in an exception.

@memberof DatastoreShim.prototype
@param {string} query - The query to parse.
@param {object} nodule - Context for the queryParse to run under.
@returns {ParsedStatement} The parsed query object.
@see DatastoreShim#setParser