MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / results

Method results

cassandra/connection.py:518–541  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

516 self.released = True
517
518 def results(self):
519 try:
520 self._condition.acquire()
521 while True:
522 while not self._page_queue and not self._stop:
523 self._condition.wait(timeout=5)
524 while self._page_queue:
525 names, rows, err = self._page_queue.pop()
526 if err:
527 raise err
528 self.maybe_request_more()
529 self._condition.release()
530 for row in self.row_factory(names, rows):
531 yield row
532 self._condition.acquire()
533 if self._stop:
534 break
535 finally:
536 try:
537 self._condition.release()
538 except RuntimeError:
539 # This exception happens if the CP results are not entirely consumed
540 # and the session is terminated by the runtime. See PYTHON-1054
541 pass
542
543 def maybe_request_more(self):
544 if not self._state:

Calls 4

maybe_request_moreMethod · 0.95
row_factoryMethod · 0.80
waitMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected