Skip to content

Cursor

Interactive database cursor for fetching typed rows on demand.

Not intended to be created directly — await a fassung.cursor.CursorFactory instead.

fetch(n, *, timeout=None) async

Fetch the next n rows and return them as a typed list.

Parameters:

Name Type Description Default
n int

Maximum number of rows to fetch.

required
timeout float | None

Optional query timeout in seconds.

None

fetchrow(*, timeout=None) async

Fetch the next row, or return None if exhausted.

Parameters:

Name Type Description Default
timeout float | None

Optional query timeout in seconds.

None

forward(n, *, timeout=None) async

Skip forward n rows and return the number of rows actually skipped.

Parameters:

Name Type Description Default
n int

Number of rows to skip.

required
timeout float | None

Optional query timeout in seconds.

None