docs: def _csv_temp(self, cursor, fieldnames):
          """Writes the rows of `cursor` in CSV format to a temporary file and
          returns the path to that file.
  
          :param cursor: database cursor containing data to be output
          :type cursor: `sqlite3.Cursor`
          :param fieldnames: row headings
          :type fieldnames: `list`
          :rtype: `str`
  
          """
          temp_fd, temp_path = tempfile.mkstemp(text=True)
          with open(temp_fd, 'w', encoding='utf-8', newline='') as results_fh:
              self._csv(cursor, fieldnames, results_fh)
          return temp_path