(self)
| 79 | return self |
| 80 | |
| 81 | def _get_next_row(self): |
| 82 | if self.done_streaming is True: |
| 83 | return |
| 84 | |
| 85 | # this is a blocking operation |
| 86 | row = next(self._streaming_result) |
| 87 | if isinstance(row, PycbcCoreException): |
| 88 | raise ErrorMapper.build_exception(row) |
| 89 | |
| 90 | # should only be None once query request is complete and _no_ errors found |
| 91 | if row is None: |
| 92 | raise StopAsyncIteration |
| 93 | |
| 94 | # TODO: until streaming, a dict is returned, no deserializing... |
| 95 | # deserialized_row = self.serializer.deserialize(row) |
| 96 | deserialized_row = row |
| 97 | if issubclass(self.row_factory, ViewRow): |
| 98 | if hasattr(self.row_factory, 'from_json'): |
| 99 | return self.row_factory.from_json(deserialized_row) |
| 100 | return self.row_factory(**deserialized_row) |
| 101 | else: |
| 102 | return deserialized_row |
| 103 | |
| 104 | def _shutdown_executor(self): |
| 105 | """ |
nothing calls this directly
no test coverage detected