Skip to content

Commit ef4a676

Browse files
authored
Merge pull request #268 from WyseNynja/manual_commit
commit in the examples
2 parents 58bb8ef + e930f5e commit ef4a676

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

docs/sa.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Example::
4949
for row in res:
5050
print(row.id, row.val)
5151

52+
await conn.commit()
53+
5254
asyncio.get_event_loop().run_until_complete(go())
5355

5456

examples/example_simple_sa.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ async def go(loop):
3030
async for row in conn.execute(tbl.select()):
3131
print(row.id, row.val)
3232

33+
await conn.commit()
34+
3335
engine.close()
3436
await engine.wait_closed()
3537

examples/example_simple_sa_oldstyle.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def go():
3535
for row in res:
3636
print(row.id, row.val)
3737

38+
yield from conn.commit()
39+
3840
engine.close()
3941
yield from engine.wait_closed()
4042

0 commit comments

Comments
 (0)