Execute a SQL query with a return value.

def query(self, sql: str, args: tuple = None):
        """Execute a SQL query with a return value."""

        with self._cursor() as cursor:
            log.debug('Running SQL: ' + str((sql, args)))
            cursor.execute(sql, args)
            return cursor.fetchall()