MCPcopy Create free account
hub / github.com/couchbase/couchbase-python-client / _get_next_row

Method _get_next_row

txcouchbase/views.py:79–98  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 return self
78
79 def _get_next_row(self):
80 if self._done_streaming is True:
81 return
82
83 row = next(self._streaming_result)
84 if isinstance(row, PycbcCoreException):
85 raise ErrorMapper.build_exception(row)
86 # should only be None one query request is complete and _no_ errors found
87 if row is None:
88 raise StopIteration
89
90 # TODO: until streaming, a dict is returned, no deserializing...
91 # deserialized_row = self.serializer.deserialize(row)
92 deserialized_row = row
93 if issubclass(self.row_factory, ViewRow):
94 if hasattr(self.row_factory, 'from_json'):
95 return self.row_factory.from_json(deserialized_row)
96 return self.row_factory(**deserialized_row)
97 else:
98 return deserialized_row
99
100 def __next__(self):
101 return stream_next(self)

Callers

nothing calls this directly

Calls 2

build_exceptionMethod · 0.80
from_jsonMethod · 0.45

Tested by

no test coverage detected