(self)
| 65 | return self |
| 66 | |
| 67 | def _get_next_row(self): |
| 68 | if self.done_streaming is True: |
| 69 | return |
| 70 | |
| 71 | try: |
| 72 | row = next(self._streaming_result) |
| 73 | except StopIteration: |
| 74 | # @TODO: PYCBC-1524 |
| 75 | row = next(self._streaming_result) |
| 76 | |
| 77 | if isinstance(row, PycbcCoreException): |
| 78 | raise ErrorMapper.build_exception(row) |
| 79 | # should only be None one query request is complete and _no_ errors found |
| 80 | if row is None: |
| 81 | raise StopIteration |
| 82 | |
| 83 | # TODO: until streaming, a dict is returned, no deserializing... |
| 84 | # deserialized_row = self.serializer.deserialize(row) |
| 85 | deserialized_row = row |
| 86 | if issubclass(self.row_factory, ViewRow): |
| 87 | if hasattr(self.row_factory, 'from_json'): |
| 88 | return self.row_factory.from_json(deserialized_row) |
| 89 | return self.row_factory(**deserialized_row) |
| 90 | else: |
| 91 | return deserialized_row |
| 92 | |
| 93 | def __next__(self): |
| 94 | return stream_next(self) |
nothing calls this directly
no test coverage detected