code: def _fetch_all_as_dict(self, cursor):
          
          desc = cursor.description
          return [
              dict(zip([col[0] for col in desc], row))
              for row in cursor.fetchall()
          ]
docs: Iterates over the result set and converts each row to a dictionary
  
          :return: A list of dictionaries where each row is a dictionary
          :rtype: list of dict