def query(self, sql, parameters=None):
        """A generator to issue a query on the server, mogrifying the
        parameters against the sql statement. Results are returned as a
        :py:class:`queries.Results` object which can act as an iterator and
        has multiple ways to access the result data.