(self)
| 110 | await st.cursor() |
| 111 | |
| 112 | async def test_cursor_external_transaction(self): |
| 113 | await self.con.execute('BEGIN') |
| 114 | try: |
| 115 | st = await self.con.prepare('SELECT generate_series(0, 2)') |
| 116 | cur = await st.cursor() |
| 117 | self.assertEqual( |
| 118 | await cur.fetch(10), |
| 119 | [(0,), (1,), (2,)]) |
| 120 | finally: |
| 121 | await self.con.execute('ROLLBACK') |
| 122 | |
| 123 | async def test_cursor_02(self): |
| 124 | st = await self.con.prepare('SELECT generate_series(0, 20)') |