code: def fetchall(self):
          
          if self._state == self._STATE_NONE:
              raise Exception("No query yet")
  
          if not self._data:
              return []
          else:
              result, self._data = self._data, []
              self._rownumber += len(result)
              return result
docs: Fetch all (remaining) rows of a query result, returning them as a sequence of sequences
          (e.g. a list of tuples).