code: def fetchall_with_fieldnames(self, sql: str, *args) \
              -> Tuple[Sequence[Sequence[Any]], Sequence[str]]:
          
          self.ensure_db_open()
          cursor = self.db.cursor()
          self.db_exec_with_cursor(cursor, sql, *args)
          try:
              rows = cursor.fetchall()
              fieldnames = [i[0] for i in cursor.description]
              return rows, fieldnames
          except:  # nopep8
              log.exception("fetchall_with_fieldnames: SQL was: " + sql)
              raise
docs: Executes SQL; returns (rows, fieldnames).