MagicStack / MagicStack/asyncpg

Explain iterable cursors in the documentation

Open
#677 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.1k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

When running

await conn.cursor(sql, prefetch=100)

I am getting error

asyncpg.exceptions._base.InterfaceError: prefetch argument can only be specified for iterable cursor

Looking into the documentation, I cannot find anything about iterable cursors. How do I declare them?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the conn.cursor(sql, prefetch=100) entry point and the InterfaceError wording in the report. Explain how an iterable cursor is declared and how prefetch applies, then update the cursor documentation with an example that answers the question.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
databases, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.