We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5513b9d commit 32fccaaCopy full SHA for 32fccaa
docs/api/index.rst
@@ -166,18 +166,17 @@ won't be prefetching any rows):
166
# Postgres requires non-scrollable cursors to be created
167
# and used in a transaction.
168
169
- async with con.transaction():
170
- # Create a Cursor object
171
- cur = await con.cursor('SELECT generate_series(0, 100)')
+ # Create a Cursor object
+ cur = await con.cursor('SELECT generate_series(0, 100)')
172
173
- # Move the cursor 10 rows forward
174
- await cur.forward(10)
+ # Move the cursor 10 rows forward
+ await cur.forward(10)
175
176
- # Fetch one row and print it
177
- print(await cur.fetchrow())
+ # Fetch one row and print it
+ print(await cur.fetchrow())
178
179
- # Fetch a list of 5 rows and print it
180
- print(await cur.fetch(5))
+ # Fetch a list of 5 rows and print it
+ print(await cur.fetch(5))
181
182
It's also possible to create cursors from prepared statements:
183
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments