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

Method _get_next_row

acouchbase/views.py:81–102  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 2

build_exceptionMethod · 0.80
from_jsonMethod · 0.45

Tested by

no test coverage detected