The rows which have been returned by the query. .. note:: If using the *acouchbase* API be sure to use ``async for`` when looping over rows. Returns: Iterable: Either an iterable or async iterable.
(self)
| 1123 | self._request = scan_request |
| 1124 | |
| 1125 | def rows(self): |
| 1126 | """The rows which have been returned by the query. |
| 1127 | |
| 1128 | .. note:: |
| 1129 | If using the *acouchbase* API be sure to use ``async for`` when looping over rows. |
| 1130 | |
| 1131 | Returns: |
| 1132 | Iterable: Either an iterable or async iterable. |
| 1133 | """ |
| 1134 | # avoid circular import |
| 1135 | from acouchbase.kv_range_scan import AsyncRangeScanRequest # noqa: F811 |
| 1136 | if isinstance(self._request, AsyncRangeScanRequest): |
| 1137 | return self.__aiter__() |
| 1138 | return self.__iter__() |
| 1139 | |
| 1140 | def cancel_scan(self): |
| 1141 | self._request.cancel_scan() |