docs: function query (query, params, options, session) {
      // require string for query
      if (typeof query !== 'string') {
          throw new Error('query error: query must be string')
      }
      // validate optional args - create objects if not passed in
      options = requireValidOptionalObject(options)
      params = requireValidOptionalObject(params)
      session = requireValidOptionalObject(session)
      // if the no insert flag is set then do not run insert queries
      if (session.noInsert && query.match(/^\s*INSERT/i)) {
          return Promise.resolve()
      }
      // get unique if for query
      var dbQueryId = randomUniqueId()
      // log query start
      this.logQuery(query, params, options, session, dbQueryId)
      // perform query using promisified interface
      return this.client.queryPromise(query, params, options)
      // success
      .then(res => {
          // perform formatting on response data
          formatResponse(res)
          // log response
          this.logQueryResponse(dbQueryId, options, res)
          // resolve with response data
          return res
      })
      // error
      .catch(err => {
          // log error
          this.logQueryError(dbQueryId, options, err)
          // reject with error
          return Promise.reject(err)
      })
  }