r"""Skip over the next *n* rows. :param float timeout: Optional timeout value in seconds. :return: A number of rows actually skipped over (<= *n*).
(self, n, *, timeout=None)
| 302 | |
| 303 | @connresource.guarded |
| 304 | async def forward(self, n, *, timeout=None) -> int: |
| 305 | r"""Skip over the next *n* rows. |
| 306 | |
| 307 | :param float timeout: Optional timeout value in seconds. |
| 308 | |
| 309 | :return: A number of rows actually skipped over (<= *n*). |
| 310 | """ |
| 311 | self._check_ready() |
| 312 | if n <= 0: |
| 313 | raise exceptions.InterfaceError('n must be greater than zero') |
| 314 | |
| 315 | protocol = self._connection._protocol |
| 316 | status = await protocol.query('MOVE FORWARD {:d} {}'.format( |
| 317 | n, self._portal_name), timeout) |
| 318 | |
| 319 | advanced = int(status.split()[1]) |
| 320 | if advanced < n: |
| 321 | self._exhausted = True |
| 322 | |
| 323 | return advanced |