Detach this result from its parent session by fetching the
        remainder of this result from the network into the buffer.

        :returns: number of records fetched

def detach(self, sync=True):
        """ Detach this result from its parent session by fetching the
        remainder of this result from the network into the buffer.

        :returns: number of records fetched
        """
        if self.attached():
            return self._session.detach(self, sync=sync)
        else:
            return 0